zhangyong 7 months ago
parent
commit
c8755d6f0c
1 changed files with 4 additions and 6 deletions
  1. 4 6
      data_channel/piaoquan.py

+ 4 - 6
data_channel/piaoquan.py

@@ -398,16 +398,14 @@ class PQ:
         if not data:
             return None
         video_url = cls.decrypt_video(data=data, decode_key=decode_key, enc_length=enc_length)
-        url_video = video_url
         new_video = video_path_url + str(video_id) + '.mp4'
         for i in range(3):
             try:
-                if video['source'] == "视频号" and int(video['is_encrypted']) == 1:
-                    with open(f"{new_video}", 'wb') as f:
-                        f.write(url_video)
-                        return new_video
+                with open(f"{new_video}", 'wb') as f:
+                    f.write(video_url)
+                    return new_video
             except Exception:
-                if i == 2:
+                if i == 3:
                     return None
 
     """票圈/快手创作者"""