diff --git a/Chapter05_Scrapy/wikiSpider/wikiSpider/articles.py b/Chapter05_Scrapy/wikiSpider/wikiSpider/articles.py index 40132c8..da48e72 100644 --- a/Chapter05_Scrapy/wikiSpider/wikiSpider/articles.py +++ b/Chapter05_Scrapy/wikiSpider/wikiSpider/articles.py @@ -9,7 +9,7 @@ class ArticleSpider(CrawlSpider): def parse_items(self, response): url = response.url - title = response.css('h1::text').extract_first() + title = response.css('h1 span::text').extract_first() text = response.xpath('//div[@id="mw-content-text"]//text()').extract() lastUpdated = response.css('li#footer-info-lastmod::text').extract_first() lastUpdated = lastUpdated.replace('This page was last edited on ', '')