def __init__(self, name, url, price=None, _id=None):
     store = Store.get_by_url(url)
     self.tag_name = store.tag_name
     self.query = store.query
     self.name = name
     self.url = url
     self._id = uuid.uuid4().hex if not None else _id
     self.price = price if not None else self.load_price()
示例#2
0
 def __init__(self, name, url, price=None, _id=None):
     self.name = name
     self.url = url
     #self.store = store
     store = Store.get_by_url(url)
     #tag_name = store.get_tag_name()
     #query = store.get_query()
     #tag_name = store.tag_name
     #query = store.query
     self.tag_name = store.tag_name
     self.query = store.query
     #self.price = self.load_price(tag_name, query)
     #self.price = None
     self.price = None if price is None else price
     self._id = uuid.uuid4().hex if _id is None else _id