def process_item(self, item): SpiderBase.process_item(self, item) if item is not None: print '******processing item in Pipline*************' linkItem = LinkItem(link=item['link'][0], title=item['title'][0], desc=item['desc'][0]) print linkItem.title linkItem.save()
def clearOldData(self): LinkItem.drop_collection() MobileLink.drop_collection()