Commit a155b84c authored by huangziyu's avatar huangziyu

1

parent 26b17079
...@@ -126,13 +126,13 @@ class SlideUtils: ...@@ -126,13 +126,13 @@ class SlideUtils:
# print(f"睡眠2秒后点击移动") # print(f"睡眠2秒后点击移动")
# time.sleep(2) # time.sleep(2)
xx = x + offset + offset_increase xx = x + offset + offset_increase
pyautogui.moveTo(x, y, duration=0.1) pyautogui.moveTo(x, y, duration=0.3)
pyautogui.mouseDown() pyautogui.mouseDown()
y += random.randint(9, 19) y += random.randint(9, 19)
pyautogui.moveTo(x + int(offset * random.randint(15, 23) / 20), y, duration=0.28) pyautogui.moveTo(x + int(offset * random.randint(15, 23) / 20), y, duration=0.5)
y += random.randint(-9, 0) y += random.randint(-9, 0)
pyautogui.moveTo(x + int(offset * random.randint(17, 21) / 20), y, duration=random.randint(20, 31) / 100) pyautogui.moveTo(x + int(offset * random.randint(17, 21) / 20), y, duration=random.randint(20, 31) / 100)
y += random.randint(0, 3) y += random.randint(0, 2)
pyautogui.moveTo(xx, y, duration=1.2) pyautogui.moveTo(xx, y, duration=1.2)
# print("睡眠2秒后松开") # print("睡眠2秒后松开")
# time.sleep(0.3) # time.sleep(0.3)
...@@ -350,7 +350,7 @@ def get_cookie(): ...@@ -350,7 +350,7 @@ def get_cookie():
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 = '110' order by docID desc limit 10000" # 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 = '110' order by docID desc limit 10000"
# query_spider_sql = f"SELECT id,url,mallId FROM DMP_SEARCH_SPIDER WHERE data_batch ='202401251550270001' and ID NOT IN (SELECT ID FROM DMP_SEARCH_DATA) and mallId = 'DS-JD' order by docID desc limit 10000" # query_spider_sql = f"SELECT id,url,mallId FROM DMP_SEARCH_SPIDER WHERE data_batch ='202401251550270001' and ID NOT IN (SELECT ID FROM DMP_SEARCH_DATA) and mallId = 'DS-JD' order by docID desc limit 10000"
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' order by docID desc limit 100" 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' order by docID desc limit 10000"
query_spider = mysql_zdzs_proxy(query_spider_sql) query_spider = mysql_zdzs_proxy(query_spider_sql)
for row in query_spider: for row in query_spider:
# while True: # while True:
...@@ -501,9 +501,9 @@ def get_cookie(): ...@@ -501,9 +501,9 @@ def get_cookie():
print("元素的Y位置:", y_position) print("元素的Y位置:", y_position)
# 其中x为屏幕左上角至滑块中心的横向像素值,y为屏幕左上角至滑块中心纵向像素值, 可根据自己屏幕配置 # 其中x为屏幕左上角至滑块中心的横向像素值,y为屏幕左上角至滑块中心纵向像素值, 可根据自己屏幕配置
# time.sleep(0.5) # time.sleep(0.5)
SlideUtils.slide_by_pyautogui(x_position, SlideUtils.slide_by_pyautogui2(x_position,
y_position, y_position,
x, x+2,
offset_increase) offset_increase)
try: try:
WebDriverWait(driver, 2).until( WebDriverWait(driver, 2).until(
......
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