Beispiel #1
0
 def has_goods(self, key):
     terms = {
         "type": CommentCrawler.type,
         "key": key,
         "$and": [
             {
                 "data.brand": {
                     "$exists": True
                 }
             },
         ],
     }
     result = Scheduler.find_one(CommentCrawler.type, terms)
     return result["data"] if result else None