소스 검색

抖音兼容未登录

zhangyong 1 년 전
부모
커밋
6e36b12aba
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      data_channel/douyin.py

+ 2 - 0
data_channel/douyin.py

@@ -52,6 +52,8 @@ class DY:
             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', [])
+            if data == [] and len(data) == 0:
+                return list
             if not data[0].get('search_impr').get('entity_type'):
                 Feishu.bot(mark, '机器自动改造消息通知', f'今日任务为空,请关注', name)
                 time.sleep(900)