|
@@ -6,6 +6,7 @@ import os
|
|
|
import shutil
|
|
|
import sys
|
|
|
import time
|
|
|
+import random
|
|
|
from hashlib import md5
|
|
|
from appium import webdriver
|
|
|
from appium.webdriver.common.touch_action import TouchAction
|
|
@@ -301,8 +302,10 @@ class ZhongmiaoyinxinRecommend:
|
|
|
Common.logger(log_type, crawler).info(f"video_url:{video_url}\n")
|
|
|
# driver.press_keycode(AndroidKey.BACK)
|
|
|
cls.download_publish(log_type, crawler, video_dict, env, driver)
|
|
|
- Common.logger(log_type, crawler).info('已抓取完一组视频,休眠10秒\n')
|
|
|
- time.sleep(10)
|
|
|
+ Common.logger(log_type, crawler).info('已抓取完一组视频,休眠60秒\n')
|
|
|
+
|
|
|
+ interval = random.randrange(50, 70)
|
|
|
+ time.sleep(interval)
|
|
|
index = index + len(video_element_temp)
|
|
|
except Exception as e:
|
|
|
Common.logger(log_type, crawler).info(f"get_videoList:{e}\n")
|