@@ -1,8 +1,10 @@
# crawler_shipinhao
+
#### 介绍
视频号爬虫项目
#### 软件架构
python==3.10
Appium_Python_Client==2.6.1
@@ -14,7 +16,6 @@ urllib3==1.26.9
#### 使用说明
-
1. cd crawler_shipinhao
2. python3 ./main/run_shipinhao_recommend.py
@@ -4,6 +4,8 @@ import logging
import os
import time
+from main.feishu_lib import Feishu
path = "../videoinfo/"
@@ -77,7 +79,16 @@ def create_log():
logger.info("这是第一条日志")
+def split_title():
+ title = Feishu.get_values_batch('demo', 'shipinhao', 'FSDlBy')[3][2]
+ print(title)
+ print('\n')
+ # print(title.split('\n')[0].split('#')[0])
+ print(title.split('\n')[0].replace('#', ''))
if __name__ == "__main__":
- print(float(str(1.2)))
+ # print(float(str(1.2)))
+ split_title()
pass
@@ -108,7 +108,7 @@ class Recommend:
# 视频标题
try:
title_id = driver.find_element(By.ID, 'com.tencent.mm:id/ki5')
- video_title = title_id.get_attribute('name')
+ video_title = title_id.get_attribute('name').split('\n')[0].replace('#', '')
except NoSuchElementException:
video_title = ''
driver.swipe(500, 1500, 500, 500, 300)