Last active
July 3, 2020 15:23
-
-
Save velotiotech/c40bf01c94a7558eb5dec156e5752b17 to your computer and use it in GitHub Desktop.
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
$cat > myspider.py <import scrapy | |
class BlogSpider(scrapy.Spider): | |
name = 'blogspider' | |
start_urls = ['https://blog.scrapinghub.com'] | |
def parse(self, response): | |
for title in response.css('h2.entry-title'): | |
yield {'title': title.css('a ::text').extract_first()} | |
EOF | |
scrapy runspider myspider.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment