Browse Source

抖音增加日志

zhangyong 1 year ago
parent
commit
892e332c42
1 changed files with 4 additions and 1 deletions
  1. 4 1
      video_capture/douyin/douyin_author/douyin_author.py

+ 4 - 1
video_capture/douyin/douyin_author/douyin_author.py

@@ -101,8 +101,11 @@ class douyinAuthor():
                 s.mount('https://', HTTPAdapter(max_retries=3))
                 response = requests.request(method='GET', url=url, headers=headers, params=query)
                 body = response.content.decode()
+                if body == "":
+                    Common.logger().info(f"请求获取body为空")
+                    continue
+                Common.logger().info(f"请求获取body数据:{body}")
                 obj = json.loads(body)
-
                 has_more = True if obj.get('has_more', 0) == 1 else False
                 next_cursor = str(obj.get('max_cursor')) if has_more else None
                 data = obj.get('aweme_list', [])