This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scrapy | |
class Spider(scrapy.Spider): | |
name = 'NAME' | |
start_urls = ['LINK'] | |
def parse(self, response): | |
for title in response.css('.post-header>h2'): | |
yield {'title': title.css('a ::text').get()} | |
for next_page in response.css('a.next-posts-link'): | |
yield response.follow(next_page, self.parse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment