Переглянути джерело

修改 readme, 更新公众号等待时间

罗俊辉 1 рік тому
батько
коміт
70371fd3f4

+ 2 - 2
gongzhonghao/gongzhonghao_author/gongzhonghao_author.py

@@ -14,7 +14,6 @@ sys.path.append(os.getcwd())
 from common.mq import MQ
 from common.common import Common
 from common.feishu import Feishu
-from common.publish import Publish
 from common.scheduling_db import MysqlHelper
 from common.public import get_config_from_mysql, download_rule, title_like, task_unbind
 
@@ -114,7 +113,7 @@ class GongzhonghaoAuthor:
     # 获取腾讯视频下载链接
     @classmethod
     def get_tencent_video_url(cls, video_id):
-        url = 'https://vv.video.qq.com/getinfo?vids=' + str(video_id) + '&platform=101001&charge=0&otype=json'
+        url = "https://h5vv.video.qq.com/getinfo?vid={}&platform=101001&charge=0&otype=json&defn=shd".format(video_id)
         headers = {
             "Host": "h5vv.video.qq.com",
             "xweb_xhr": "1",
@@ -134,6 +133,7 @@ class GongzhonghaoAuthor:
         name = vl['fn']
         folder = vl['ul']['ui'][0]['url']
         video_url = folder + name + "?vkey=" + key
+        time.sleep(random.randint(1, 5))
         return video_url
 
     @classmethod