zhangyong 9 月之前
父节点
当前提交
54d7d93939
共有 2 个文件被更改,包括 19 次插入17 次删除
  1. 17 17
      data_channel/dy_ls.py
  2. 2 0
      video_rewriting/video_processor.py

+ 17 - 17
data_channel/dy_ls.py

@@ -14,24 +14,24 @@ class DYLS:
     def get_dyls_list(cls, task_mark, url_id, number, mark):
         next_cursor = ""
         for i in range(50):
-            #  抖查查
-            url = "http://8.217.190.241:8888/crawler/dou_yin/blogger"
-            payload = json.dumps({
-                "account_id": url_id,
-                "source": "抖查查",
-                "cursor": next_cursor
-            })
-            headers = {
-                'Content-Type': 'application/json'
-            }
-            time.sleep(random.randint(1, 5))
-            response = requests.request("POST", url, headers=headers, data=payload)
-            response = response.json()
-            list = []
-            data_all_list = response["data"]
-            has_more = data_all_list["has_more"]
-            next_cursor = str(data_all_list["next_cursor"])
             try:
+                #  抖查查
+                url = "http://8.217.190.241:8888/crawler/dou_yin/blogger"
+                payload = json.dumps({
+                    "account_id": url_id,
+                    "source": "抖查查",
+                    "cursor": next_cursor
+                })
+                headers = {
+                    'Content-Type': 'application/json'
+                }
+                time.sleep(random.randint(1, 5))
+                response = requests.request("POST", url, headers=headers, data=payload)
+                response = response.json()
+                list = []
+                data_all_list = response["data"]
+                has_more = data_all_list["has_more"]
+                next_cursor = str(data_all_list["next_cursor"])
                 data_list = data_all_list["data"]
                 for data in data_list:
                     # comment_count = data["comment_count"]

+ 2 - 0
video_rewriting/video_processor.py

@@ -74,6 +74,8 @@ class VideoProcessor:
         """
         task_mark = task["task_mark"]
         channel_id = str(task["channel_id"])
+        if channel_id == "抖音":
+            return
         channel_urls = str(task["channel_url"])
         piaoquan_id = str(task["piaoquan_id"])
         number = task["number"]