Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行4-1distributed scraping 报错 #7

Open
whiteminta3 opened this issue Oct 26, 2020 · 0 comments
Open

运行4-1distributed scraping 报错 #7

whiteminta3 opened this issue Oct 26, 2020 · 0 comments

Comments

@whiteminta3
Copy link

Distributed Crawling...

Distributed Parsing...
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\PYTHON\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "D:\sublime\mofan爬虫教程\4-1-distributed-scraping.py", line 18, in parse
page_urls = set([urljoin(base_url, url['href']) for url in urls]) # remove duplication
File "D:\sublime\mofan爬虫教程\4-1-distributed-scraping.py", line 18, in
page_urls = set([urljoin(base_url, url['href']) for url in urls]) # remove duplication
NameError: name 'base_url' is not defined
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "4-1-distributed-scraping.py", line 49, in
results = [j.get() for j in parse_jobs] # parse html
File "4-1-distributed-scraping.py", line 49, in
results = [j.get() for j in parse_jobs] # parse html
File "C:\PYTHON\lib\multiprocessing\pool.py", line 771, in get
raise self._value
NameError: name 'base_url' is not defined

Repl Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant