Browse Source

修改西瓜

罗俊辉 1 year ago
parent
commit
ed7b4d0e24
1 changed files with 8 additions and 4 deletions
  1. 8 4
      xigua/xigua_author/xigua_author.py

+ 8 - 4
xigua/xigua_author/xigua_author.py

@@ -654,7 +654,7 @@ class XiGuaAuthor:
         :param account: 输入的账号信息
         {'play_cnt': {'min': 100000, 'max': 0}, 'period': {'min': 5, 'max': 5}}
         """
-        flag = account.split("_")[-1]
+        flag = account['link'].split("_")[0]
         if flag == "V1":
             rule_dict = {
                 "play_cnt": {"min": 50000, "max": 0},
@@ -701,10 +701,14 @@ class XiGuaAuthor:
         signature = random_signature()
         url = "https://www.ixigua.com/api/videov2/author/new_video_list?"
         while True:
-            params = {
-                "to_user_id": str(
+            if user_dict['link'][0] == "V":
+                to_user_id = str(user_dict["link"][2:].replace("https://www.ixigua.com/home/", ""))
+            else:
+                to_user_id = str(
                     user_dict["link"].replace("https://www.ixigua.com/home/", "")
-                ),
+                )
+            params = {
+                "to_user_id": to_user_id,
                 "offset": str(offset),
                 "limit": "30",
                 "maxBehotTime": "0",