2019-08-18 03:12:00 [scrapy.middleware] INFO: Enabled item pipelines:
[]
2019-08-18 03:12:00 [scrapy.core.engine] INFO: Spider opened
2019-08-18 03:12:00 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2019-08-18 03:12:00 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2019-08-18 03:12:00 [scrapy.core.engine] INFO: Closing spider (finished)
2019-08-18 03:12:00 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{‘elapsed_time_seconds’: 0.007981,
‘finish_reason’: ‘finished’,
‘finish_time’: datetime.datetime(2019, 8, 17, 21, 42, 0, 173161),
‘log_count/INFO’: 10,
‘start_time’: datetime.datetime(2019, 8, 17, 21, 42, 0, 165180)}
2019-08-18 03:12:00 [scrapy.core.engine] INFO: Spider closed (finished)
No website data is fetched …using same code as in video
import scrapy
class QuotesSpider(scrapy.Spider):
name=“quotes_spider”
def start_requests(self):
urls=[‘http://quotes.toscrape.com/1/’,
‘http://quotes.toscrape.com/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"%page
with open(filename,'wb') as f:
f.write(response.body)
self.log('Saved file-%s'%filename)