I am using scrapy and trying to come up with a restrict_xpaths rule so the crawler will always go only to the next image.
and my goal is to continuously scrape the next one.
I tried:
name = "FlickerSpider"
allowed_domains = ["flickr.com"]
start_urls = [
"https://www.flickr.com/photos/indymcduff/6632326011/in/photolist-9uQnYG-9SnqTY-qjXTHY-onEUN5-5d72ri-tgMKAY-8qaRQL-on6ZLu-bnMg2B-8AVUgV-b75pst/"
]
rules = (
#crawl to next image
Rule(SgmlLinkExtractor(allow=(r'photos'),restrict_xpaths=('//class[@data="navigate-target navigate-next")]')) ,callback='parse_item', follow=True),
)
but I don't get any requests. Anyone has a suggestion of what rule should I be using? Thanks!