Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define $DEPENDS for python. #1

Open
dipankar08 opened this issue Aug 19, 2016 · 0 comments
Open

Define $DEPENDS for python. #1

dipankar08 opened this issue Aug 19, 2016 · 0 comments

Comments

@dipankar08
Copy link
Owner

I want to execure code like
import scrapy

class BlogSpider(scrapy.Spider):
name = 'blogspider'
start_urls = ['https://blog.scrapinghub.com']

def parse(self, response):
    for url in response.css('ul li a::attr("href")').re('.*/category/.*'):
        yield scrapy.Request(response.urljoin(url), self.parse_titles)

def parse_titles(self, response):
    for post_title in response.css('div.entries > ul > li a::text').extract():
        yield {'title': post_title}

Traceback (most recent call last):
File "/tmp/NBAC.py", line 1, in
import scrapy
ImportError: No module named scrapy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant