第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法運(yùn)行“爬行報價”

無法運(yùn)行“爬行報價”

富國滬深 2021-10-19 09:53:47
無法使scrapy教程起作用。我正在嘗試學(xué)習(xí)scrapy,但甚至無法運(yùn)行教程。我試圖在 python 3.7 & 3.5.5 中運(yùn)行它,結(jié)果相同導(dǎo)入scrapy類 QuotesSpider(scrapy.Spider): name = "quotes"def start_requests(self):    urls = [        'http://quotes.toscrape.com/page/1/',        'http://quotes.toscrape.com/page/2/',    ]    for url in urls:        yield scrapy.Request(url=url, callback=self.parse)def parse(self, response):    page = response.url.split("/")[-2]    filename = 'quotes-%s.html' % page    with open(filename, 'wb') as f:        f.write(response.body)    self.log('Saved file %s' % filename)這似乎運(yùn)行正常。至少它不會拋出任何錯誤。當(dāng)我在 Anaconda 提示窗口中運(yùn)行“scrapy crawl quote”時,我得到了這個:"hed) C:\Users\userOne\python script files\scrapy\tutorial>scrapy crawl  quotes 2019-01-23 18:34:27 [scrapy.utils.log] INFO: Scrapy 1.5.1 started (bot:  tutorial) 2019-01-23 18:34:27 [scrapy.utils.log] INFO: Versions: lxml 4.2.3.0, libxml2  2.9.5, cssselect 1.0.3, parsel 1.5.0, w3lib 1.19.0, Twisted 18.7.0, Python  3.5.5 | packaged by conda-forge | (default, Jul 24 2018, 01:52:17) [MSC  v.1900 64 bit (AMD64)], pyOpenSSL 18.0.0 (OpenSSL 1.0.2p  14 Aug 2018),  cryptography 2.3.1, Platform Windows-10-10.0.17134-SP0 Traceback (most recent call last):   File "C:\Users\userOne\Anaconda3\envs\hed\lib\site- packages\scrapy\spiderloader.py", line 69, in load     return self._spiders[spider_name] KeyError: 'quotes' During handling of the above exception, another exception occurred: Traceback (most recent call last):   File "C:\Users\userOne\Anaconda3\envs\hed\Scripts\scrapy-script.py", line  10, in <module>     sys.exit(execute())   File "C:\Users\userOne\Anaconda3\envs\hed\lib\site- packages\scrapy\cmdline.py", line 150, in execute     _run_print_help(parser, _run_command, cmd, args, opts)   File "C:\Users\userOne\Anaconda3\envs\hed\lib\site- packages\scrapy\cmdline.py", line 90, in _run_print_help     func(*a, **kw)   File "C:\Users\userOne\Anaconda3\envs\hed\lib\site- packages\scrapy\cmdline.py", line 157, in _run_command
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 272 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號