Commit 87c61369 authored by huangziyu's avatar huangziyu

1

parent 27300c43
...@@ -58,6 +58,10 @@ account_list = [ ...@@ -58,6 +58,10 @@ account_list = [
'username':'15045077987', 'username':'15045077987',
'password':'zt20010311jd', 'password':'zt20010311jd',
}, },
{
'username':'13801194827',
'password':'072600uddz',
},
{ {
'username':'Liantong9690', 'username':'Liantong9690',
'password':'123456ab', 'password':'123456ab',
......
...@@ -60,6 +60,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -60,6 +60,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
...@@ -91,7 +92,7 @@ def get_cookie(username=None, password=None, driver=None): ...@@ -91,7 +92,7 @@ def get_cookie(username=None, password=None, driver=None):
count = count + 1 count = count + 1
print(f"需要登录") print(f"需要登录")
time.sleep(1) time.sleep(1)
query_spider_sql = f"SELECT id,url,mallId FROM DMP_SEARCH_SPIDER WHERE ID NOT IN (SELECT ID FROM DMP_SEARCH_DATA) and mallId = 'DS-JD' and project_id = '41' and id like '%0' limit 30000" query_spider_sql = f"SELECT id,url,mallId,docId FROM DMP_SEARCH_SPIDER WHERE ID NOT IN (SELECT ID FROM DMP_SEARCH_DATA) and mallId = 'DS-JD' and project_id = '41' and id like '%0' limit 30000"
query_spider = mysql_zdzs_proxy(query_spider_sql) query_spider = mysql_zdzs_proxy(query_spider_sql)
index = 0 index = 0
len_ = len(query_spider) len_ = len(query_spider)
...@@ -104,6 +105,7 @@ def get_cookie(username=None, password=None, driver=None): ...@@ -104,6 +105,7 @@ def get_cookie(username=None, password=None, driver=None):
index += 1 index += 1
print(f"len={len_},index={index}") print(f"len={len_},index={index}")
url = row['url'] url = row['url']
print(row['docId'])
print(url) print(url)
driver.get(url) driver.get(url)
while driver.title == '京东(JD.COM)-正品低价、品质保障、配送及时、轻松购物!': while driver.title == '京东(JD.COM)-正品低价、品质保障、配送及时、轻松购物!':
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -63,6 +63,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -77,6 +77,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -77,6 +77,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
...@@ -39,6 +39,7 @@ def mysql_zdzs_proxy(sql=None): ...@@ -39,6 +39,7 @@ def mysql_zdzs_proxy(sql=None):
# cur.close() # cur.close()
return [] return []
except Exception as e: except Exception as e:
print(f"插入异常:{e}")
return [] return []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment