Browse Source

修改封面

罗俊辉 11 months ago
parent
commit
332978be63
4 changed files with 10 additions and 9 deletions
  1. 1 1
      deal/videos_deal.py
  2. 1 1
      task/wx_search_task.py
  3. 0 0
      test/mysql.py
  4. 8 7
      test/videos_dev.py

+ 1 - 1
deal/videos_deal.py

@@ -28,7 +28,7 @@ class VideoDeal(object):
         for temp_list in sub_list:
             vid_list = [i[0] for i in temp_list]
             pq_response = get_info_lists(vid_list=vid_list)
-            cover_list = [i['coverImg']['coverImgPath'] for i in pq_response['data']]
+            cover_list = [i['shareImgPath'] for i in pq_response['data']]
             publish_time_list = [i['gmtCreateTimestamp'] for i in pq_response['data']]
             for index, obj in enumerate(temp_list):
                 temp = {

+ 1 - 1
task/wx_search_task.py

@@ -98,7 +98,7 @@ class wxGenerateTask(object):
 
 if __name__ == '__main__':
     wgt = wxGenerateTask(mysql_client="client")
-    text = wgt.get_article_text("https://mp.weixin.qq.com/s/BzLrY7QD_XzLzvCq2ScodA")
+    text = wgt.get_article_text("https://mp.weixin.qq.com/s/8lk6A3NuGduVb4N6uUaBNg")
     img_list = text['data']['data']['image_url_list']
     img_list = [i['image_url'] for i in img_list]
     cover = img_list[0]

File diff suppressed because it is too large
+ 0 - 0
test/mysql.py


+ 8 - 7
test/videos_dev.py

@@ -9,14 +9,14 @@ import requests
 cate: video_return, video_view, video_rov
 """
 
-# url = "http://47.99.132.47:8888/videos"
-url = "http://localhost:8888/videos"
+url = "http://47.99.132.47:8888/videos"
+# url = "http://localhost:8888/videos"
 
 body = {
     "cate": "video_return",
-    "start_date": "2024-06-01",
+    "start_date": "2024-01-01",
     "end_date": "2024-07-06",
-    "topN": 800
+    "topN": 200
 }
 a = time.time()
 header = {
@@ -28,6 +28,7 @@ b = time.time()
 print(b - a)
 print(len(response.json()['data']))
 for i in response.json()['data']:
-    print(i['title'])
-    print(i['video_url'])
-    print("\n")
+    print(i)
+    # print(i['title'])
+    # print(i['video_url'])
+    # print("\n")

Some files were not shown because too many files changed in this diff