Commit 16a0551b authored by Vasyl Bodnaruk's avatar Vasyl Bodnaruk

Fix bug with cmd arguments

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