Commit 4d5f7514 authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Add function can_follow for check possible request to next page

parent b17357f1
...@@ -23,3 +23,9 @@ class BaseSpider(scrapy.Spider): ...@@ -23,3 +23,9 @@ class BaseSpider(scrapy.Spider):
companies = CompanyMaker(db.select(self.query)) companies = CompanyMaker(db.select(self.query))
companies.make_companies(name) companies.make_companies(name)
return companies.get_companies() return companies.get_companies()
def can_follow(self, next_url, duplicate):
if next_url and duplicate:
return True
else:
return False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment