讨论/综合讨论/请大神帮忙爬虫scrapy debug/
请大神帮忙爬虫scrapy debug

C:\Windows\System32\jobui>"C:/Program Files/Python37-32/python.exe" c:/Windows/S
ystem32/jobui/main.py
2020-05-16 14:14:43 [scrapy.utils.log] INFO: Scrapy 2.1.0 started (bot: jobui)
2020-05-16 14:14:43 [scrapy.utils.log] INFO: Versions: lxml 4.5.0.0, libxml2 2.9.5, cssselect 1.1.0, parsel 1.5.2, w3lib 1.21.0, Twisted 20.3.0, Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)], pyOpenSSL 19.1.0 (OpenSSL 1.1.1g 21 Apr 2020), cryptography 2.9.2, Platform Windows-7-6.1.7601-SP1
2020-05-16 14:14:43 [scrapy.utils.log] DEBUG: Using reactor: twisted.internet.selectreactor.SelectReactor
2020-05-16 14:14:43 [scrapy.crawler] INFO: Overridden settings:
{'BOT_NAME': 'jobui',
'DOWNLOAD_DELAY': 0.5,
'NEWSPIDER_MODULE': 'jobui.spiders',
'SPIDER_MODULES': ['jobui.spiders'],
'USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 '
'(KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}
2020-05-16 14:14:44 [scrapy.extensions.telnet] INFO: Telnet Password: 878962cbde1c43cb
2020-05-16 14:14:44 [scrapy.middleware] INFO: Enabled extensions:
['scrapy.extensions.corestats.CoreStats',
'scrapy.extensions.telnet.TelnetConsole',
'scrapy.extensions.logstats.LogStats']
2020-05-16 14:14:49 [scrapy.middleware] INFO: Enabled downloader middlewares:
['scrapy.downloadermiddlewares.httpauth.HttpAuthMiddleware',
'scrapy.downloadermiddlewares.downloadtimeout.DownloadTimeoutMiddleware',
'scrapy.downloadermiddlewares.defaultheaders.DefaultHeadersMiddleware',
'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware',
'scrapy.downloadermiddlewares.retry.RetryMiddleware',
'scrapy.downloadermiddlewares.redirect.MetaRefreshMiddleware',
'scrapy.downloadermiddlewares.httpcompression.HttpCompressionMiddleware',
'scrapy.downloadermiddlewares.redirect.RedirectMiddleware',
'scrapy.downloadermiddlewares.cookies.CookiesMiddleware',
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware',
'scrapy.downloadermiddlewares.stats.DownloaderStats']
2020-05-16 14:14:49 [scrapy.middleware] INFO: Enabled spider middlewares:
['scrapy.spidermiddlewares.httperror.HttpErrorMiddleware',
'scrapy.spidermiddlewares.offsite.OffsiteMiddleware',
'scrapy.spidermiddlewares.referer.RefererMiddleware',
'scrapy.spidermiddlewares.urllength.UrlLengthMiddleware',
'scrapy.spidermiddlewares.depth.DepthMiddleware']
2020-05-16 14:14:49 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2020-05-16 14:14:49 [scrapy.core.engine] INFO: Spider opened
2020-05-16 14:14:49 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at
0 items/min)
2020-05-16 14:14:49 [py.warnings] WARNING: C:\Program Files\Python37-32\lib\site-packages\scrapy\spidermiddlewares\offsite.py:65: URLWarning: allowed_domains accepts only domains, not URLs. Ignoring URL entry https://www.jobui.com in allowed_domains.
warnings.warn(message, URLWarning)

2020-05-16 14:14:49 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2020-05-16 14:14:50 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.jobui.com/rank/company/> (referer: None)
2020-05-16 14:14:50 [scrapy.spidermiddlewares.offsite] DEBUG: Filtered offsite request to 'www.jobui.com': <GET https://www.jobui.com/company/10375749/jobs>
2020-05-16 14:14:50 [scrapy.core.engine] INFO: Closing spider (finished)
2020-05-16 14:14:50 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 301,
'downloader/request_count': 1,
'downloader/request_method_count/GET': 1,
'downloader/response_bytes': 5841,
'downloader/response_count': 1,
'downloader/response_status_count/200': 1,
'elapsed_time_seconds': 1.145066,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2020, 5, 16, 6, 14, 50, 586455),
'log_count/DEBUG': 2,
'log_count/INFO': 10,
'log_count/WARNING': 1,
'offsite/domains': 1,
'offsite/filtered': 10,
'request_depth_max': 1,
'response_received_count': 1,
'scheduler/dequeued': 1,
'scheduler/dequeued/memory': 1,
'scheduler/enqueued': 1,
'scheduler/enqueued/memory': 1,
'start_time': datetime.datetime(2020, 5, 16, 6, 14, 49, 441389)}
2020-05-16 14:14:50 [scrapy.core.engine] INFO: Spider closed (finished)

请问这上面说的是什么问题呢?怎么debug呢?谢谢!

展开讨论
罗兰🍓发起于 2020-05-16

allowed_domains = ['www.jobui.com'] 或者 ['jobui.com'] 试试