Explorar o código

快手数据抓取优化

zhangyong hai 1 ano
pai
achega
4b80c72b1f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      video_capture/kuaishou/kuaishou_author/kuaishou_author.py

+ 2 - 2
video_capture/kuaishou/kuaishou_author/kuaishou_author.py

@@ -111,11 +111,11 @@ class kuaishouAuthor():
                     elif "feeds" not in response.json()["data"]["visionProfilePhotoList"]:
                         Common.logger().info(
                             f'数据为空{response.json()["data"]["visionProfilePhotoList"]}')
-                        continue
+                        break
                     elif len(response.json()["data"]["visionProfilePhotoList"]["feeds"]) == 0:
                         Common.logger().info(
                             f'数据为空{response.json()["data"]["visionProfilePhotoList"]["feeds"]}')
-                        continue
+                        break
                     pcursor = response.json()['data']['visionProfilePhotoList']['pcursor']
                     feeds = response.json()['data']['visionProfilePhotoList']['feeds']
                     count = 0