Reputation: 601
I am making a web crawler using scrapy framework in python. The main idea is that the crawler extracts some data from the page, if the data matches some criteria the crawler should extract the URL its currently standing on. Is there some method/function in scrappy that gets the current URL?
Thanks.
Upvotes: 0
Views: 105
Reputation: 5490
The 'response' variable that's passed to parse() has the info you want. You shouldn't need to override anything.
eg.
def parse(self, response):
print "URL: " + response.url
Upvotes: 2