13283339616 6 jaren geleden
bovenliggende
commit
9da33d3c73
3 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      xiaowu/settings.py
  2. 1 1
      xiaowu/spiders/meunSpider.py
  3. 1 1
      xiaowu/spiders/meunSpiderEveryday.py

+ 1 - 1
xiaowu/settings.py

@@ -76,7 +76,7 @@ USER_AGENTS = [
76 76
     "Mozilla/5.0 (X11; Linux i686; U;) Gecko/20070322 Kazehakase/0.4.5"
77 77
 ]
78 78
 PROXIES = [
79
-    {'ip_port': '203.174.112.13:3128', 'user_pass': ''},
79
+    {'ip_port': '114.215.107.94:60443', 'user_pass': ''},
80 80
     # {'ip_port': '61.135.217.7:80', 'user_pass': ''},
81 81
     # {'ip_port': '218.72.64.204:18118', 'user_pass': ''},
82 82
     # {'ip_port': '183.159.93.219:18118', 'user_pass': ''},

+ 1 - 1
xiaowu/spiders/meunSpider.py

@@ -68,7 +68,7 @@ class MeunspiderSpider(scrapy.Spider):
68 68
         for key in materials:
69 69
             materialsStr=materialsStr+key+","+materials[key]+";"
70 70
         materials=materialsStr.rstrip(';')
71
-        sql = "INSERT INTO menu(title,tags,intro,ingredients,url,burden,created_at,origin) VALUES ('%s','%s','%s','%s','%s' ,'%s' ,'%s' ,'%s' )"%(title,outerdescrib,describ,materials,figure,' ',timestamp,filename)
71
+        sql = "INSERT INTO menu(title,tags,intro,ingredients,url,burden,created_at,origin,status) VALUES ('%s','%s','%s','%s','%s' ,'%s' ,'%s' ,'%s' ,'%s' )"%(title,outerdescrib,describ,materials,figure,' ',timestamp,filename,1)
72 72
 
73 73
         try:
74 74
             # # 执行sql语句

+ 1 - 1
xiaowu/spiders/meunSpiderEveryday.py

@@ -78,7 +78,7 @@ class MeunspiderSpider(scrapy.Spider):
78 78
             # 获取所有记录列表
79 79
             results=cursor.fetchall()
80 80
             if(len(results)==0):
81
-                sql = "INSERT INTO menu(title,tags,intro,ingredients,url,burden,created_at,origin) VALUES ('%s','%s','%s','%s','%s' ,'%s' ,'%s' ,'%s' )"%(title,outerdescrib,describ,materials,figure,' ',timestamp,filename)
81
+                sql = "INSERT INTO menu(title,tags,intro,ingredients,url,burden,created_at,origin,status) VALUES ('%s','%s','%s','%s','%s' ,'%s' ,'%s' ,'%s' ,'%s' )"%(title,outerdescrib,describ,materials,figure,' ',timestamp,filename,1)
82 82
                 try:
83 83
                     cursor.execute(sql)
84 84
                     db.commit()