Exemplo n.º 1
0
 def process_item(self, item, spider):
     print "++++", item
     Business.insert_one_by_names(
                         self.dbcursor,
                         name=str(item['name']).strip(),
                         url=str(item['url']).strip(),
                         phone=str(item['phone']).strip(),
                         address=str(item['address']).strip(),
                         category='TUR'
                         )
     Business.commit(self.dbcursor)
     return item