Browse Source

修复视频号

zhangyong 6 months ago
parent
commit
32e32316ba
1 changed files with 3 additions and 1 deletions
  1. 3 1
      data_channel/shipinhao.py

+ 3 - 1
data_channel/shipinhao.py

@@ -79,6 +79,8 @@ class SPH:
                 if res_json['code'] == 0:
                     # next_cursor = res_json['data']['next_cursor']
                     data_lsit = res_json['data']['data']
+                    if data_lsit == None:
+                        return list
                     for obj in data_lsit:
                         objectId = obj['id']
                         status = sqlCollect.is_used(task_mark, objectId, mark, "视频号")
@@ -87,7 +89,7 @@ class SPH:
                         url_p = obj['objectDesc']['media'][0]['Url']
                         url_token = obj['objectDesc']['media'][0]['urlToken']
                         video_url = f"{url_p}{url_token}"
-                        decode_key = obj['objectDesc']['media'][0]['FileSize']
+                        decode_key = obj['objectDesc']['media'][0]['decodeKey']
                         cover = obj['objectDesc']['media'][0]['coverUrl']
 
                         share_cnt = int(obj['forwardCount'])  # 分享