diff --git a/Chapter08_Scrapy/wikiSpider/wikiSpider/spiders/article.py b/Chapter08_Scrapy/wikiSpider/wikiSpider/spiders/article.py index a793863..7e97f19 100644 --- a/Chapter08_Scrapy/wikiSpider/wikiSpider/spiders/article.py +++ b/Chapter08_Scrapy/wikiSpider/wikiSpider/spiders/article.py @@ -12,7 +12,7 @@ def start_requests(self): def parse(self, response): url = response.url - title = response.css('h1::text').extract_first() + title = response.css('h1 .mw-page-title-main::text').extract_first() print('URL is: {}'.format(url)) print('Title is: {}'.format(title))