|
@@ -252,7 +252,7 @@ class ShipinhaoSearch:
|
|
Common.logger(log_type, crawler).info('切换到视频号 webview 成功')
|
|
Common.logger(log_type, crawler).info('切换到视频号 webview 成功')
|
|
return "成功"
|
|
return "成功"
|
|
except Exception as e:
|
|
except Exception as e:
|
|
- Common.logger(log_type, crawler).info(f"{e}\n")
|
|
|
|
|
|
+ Common.logger(log_type, crawler).info(f"切换失败")
|
|
|
|
|
|
@classmethod
|
|
@classmethod
|
|
def repeat_out_video_id(cls, log_type, crawler, out_video_id, env):
|
|
def repeat_out_video_id(cls, log_type, crawler, out_video_id, env):
|
|
@@ -335,7 +335,8 @@ class ShipinhaoSearch:
|
|
if len(video_element.find_elements(By.XPATH, "//*[@text='没有更多的搜索结果']")) != 0:
|
|
if len(video_element.find_elements(By.XPATH, "//*[@text='没有更多的搜索结果']")) != 0:
|
|
Common.logger(log_type, crawler).info("没有更多的搜索结果\n")
|
|
Common.logger(log_type, crawler).info("没有更多的搜索结果\n")
|
|
return
|
|
return
|
|
- video_title = video_element.find_elements(By.XPATH, '//div[@class="title ellipsis_2"]/*[2]')[index + i].text[:40]
|
|
|
|
|
|
+ # video_title = video_element.find_elements(By.XPATH, '//div[@class="title ellipsis_2"]/*[2]')[index + i].text[:40]
|
|
|
|
+ video_title = video_element.find_elements(By.XPATH, '//div[@class="rich-media__title ellipsis_2"]/span')[index + i].text[:40]
|
|
video_url = video_element.find_elements(By.XPATH, '//div[@class="video-player"]')[index+i].get_attribute('src')
|
|
video_url = video_element.find_elements(By.XPATH, '//div[@class="video-player"]')[index+i].get_attribute('src')
|
|
cover_url = video_element.find_elements(By.XPATH, '//div[@class="video-player__bd"]')[index+i].get_attribute('style')
|
|
cover_url = video_element.find_elements(By.XPATH, '//div[@class="video-player__bd"]')[index+i].get_attribute('style')
|
|
cover_url = cover_url.split('url("')[-1].split('")')[0]
|
|
cover_url = cover_url.split('url("')[-1].split('")')[0]
|