zhangyong 4 months ago
parent
commit
23097fd88c
3 changed files with 6 additions and 2 deletions
  1. 2 1
      data_channel/ks_keyword.py
  2. 2 0
      data_channel/ks_ls.py
  3. 2 1
      data_channel/kuaishou.py

+ 2 - 1
data_channel/ks_keyword.py

@@ -21,7 +21,8 @@ class KsKeyword:
 
         url = "http://8.217.192.46:8889/crawler/kuai_shou/keyword"
         list = []
-
+        if not keyword:
+            return
         payload = json.dumps({
             "keyword": keyword,
             "content_type": content_type,

+ 2 - 0
data_channel/ks_ls.py

@@ -13,6 +13,8 @@ class KSLS:
         url = "http://8.217.192.46:8889/crawler/kuai_shou/blogger"
         next_cursor = ""
         try:
+            if not url_id:
+                return
             for i in range(5):
                 payload = json.dumps({
                     "account_id": url_id,

+ 2 - 1
data_channel/kuaishou.py

@@ -39,7 +39,8 @@ class KS:
         list = []
         pcursor = ""
         url = "https://www.kuaishou.com/graphql"
-
+        if not url_id:
+            return 
         for i in range(3):
             cookie = Material.get_cookie_data(feishu_id, cookie_sheet, channel_id)
             time.sleep(random.randint(1, 5))