chuwanghui 6 rokov pred
rodič
commit
f52636833b
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      ApiCrawler/ApiCrawler/pipelines.py

+ 1 - 1
ApiCrawler/ApiCrawler/pipelines.py

@@ -25,7 +25,7 @@ class MySQLPipeLine(object):
         return  item
     def _conditional_insert(self,conn,item):
         #调用存储过程方法
-        conn.execute('CALL InsertAPIData(%s,%s,%s,%s,%s)', (item['url'],item['title'],item['keywords'],item['description'],item['content']))
+        conn.execute('CALL InsertAPIData(%s,%s,%s,%s,%s,%s)', (item['url'],item['title'],item['keywords'],item['description'],item['content'],item['author']))
         #log.msg("Item data in db:%s" %item,level=log.DEBUG)
     def handle_error(self,e):
         #错误处理