Skip to content

Commit 8462666

Browse files
authored
Merge pull request #114 from ACPK/patch-4
Remove the `^` from regex that is looking for Wiki article links.
2 parents 80c343b + 217b654 commit 8462666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Chapter05_Scrapy/wikiSpider/wikiSpider/articlesMoreRules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ArticleSpider(CrawlSpider):
66
allowed_domains = ['wikipedia.org']
77
start_urls = ['https://en.wikipedia.org/wiki/Benevolent_dictator_for_life']
88
rules = [
9-
Rule(LinkExtractor(allow='^(/wiki/)((?!:).)*$'), callback='parse_items', follow=True, cb_kwargs={'is_article': True}),
9+
Rule(LinkExtractor(allow='(/wiki/)((?!:).)*$'), callback='parse_items', follow=True, cb_kwargs={'is_article': True}),
1010
Rule(LinkExtractor(allow='.*'), callback='parse_items', cb_kwargs={'is_article': False})
1111
]
1212

0 commit comments

Comments
 (0)