我安装pycharm后用内部terminal可以运行,应该是window shell的问题,希望有懂的大佬分享一下原因,谢谢
2019.4.30
--------------------------------------------------------------------------------------------------------------------------------------------------------------
各位大佬好,小弟在用python3写scrapy框架爬虫时遇到一些问题,代码与问题如下
.\spider\quotes.py
import scrapy
from tutorial.items import QuoteItem
class QuotesSpider(scrapy.Spider):
name = 'quotes'
allowed_domains = ['quotes.toscrape.com']
start_urls = ['http://quotes.toscrape.com/']
def parse(self, response):
item = QuoteItem()
quotes = response.css('.quote')
for quote in quotes:
item['text'] = quote.css('.text::text').extract_first()
item['author'] = quote.css('.author::text').extract_first()
item['tags'] = quote.