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

Add flag fresh for rescrap all news or only fresh

parent 3c67ade8
......@@ -10,7 +10,7 @@ class BaseSpider(scrapy.Spider):
def __init__(self, query=None, fresh=True, *args, **kwargs):
super(BaseSpider, self).__init__(*args, **kwargs)
self.condition = query
self.fresh = False if fresh == 'False' else True
self.fresh = False if fresh == 'False' else fresh
self.query = "SELECT id, name, country FROM wp_esi_entity WHERE 1 and id=3"
if self.condition:
print(self.condition)
......
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