Browse Source

视频号-更改规则

zhangyong 1 year ago
parent
commit
b759287d9d
1 changed files with 4 additions and 3 deletions
  1. 4 3
      shipinhao/shipinhao_author/shipinhao_author.py

+ 4 - 3
shipinhao/shipinhao_author/shipinhao_author.py

@@ -233,10 +233,11 @@ class ShiPinHaoAuthor(object):
             "crawler_rule": self.rule_dict,
             "session": f"shipinhao-author-{int(time.time())}",
         }
-        if share_cnt == 0:
+        fav_count = int(obj['fav_count'])
+        if fav_count == 0:
             divisor_cnt = 0
         else:
-            divisor_cnt = int(share_cnt / like_cnt)
+            divisor_cnt = int(share_cnt / (fav_count+1))
         # 视频时长小于30秒 返回
         if duration < 20:
             values = [[
@@ -293,7 +294,7 @@ class ShiPinHaoAuthor(object):
                 video_obj.get('title').split("\n")[0].split("#")[0],
                 duration,
                 '否',
-                f'分享小于100000,分享/点赞:{divisor_cnt}',
+                f'分享小于100000,分享/大拇指:{divisor_cnt}',
                 video_obj.get('DownloadAddress')
             ]]
             Feishu.insert_columns(self.platform, 'shipinhao', "Vq7NeH", "ROWS", 1, 2)