Skip to content

Instantly share code, notes, and snippets.

@newbiethetest
Created September 23, 2014 02:30
Show Gist options
  • Save newbiethetest/9d11981b5ca518c9f2d2 to your computer and use it in GitHub Desktop.
Save newbiethetest/9d11981b5ca518c9f2d2 to your computer and use it in GitHub Desktop.
def process_item(self,item,spider):
try:
#self.cursors.execute("select version()")
self.cursors.execute('''INSERT INTO `niaoyunTable` (title, href)
VALUES (%s, %s)'''%(item['title'],item['href']))
self.connect.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment