import urllib.request import requests, os, threading from Crypto.Cipher import AES from src.Pacho.moviePa.tsdownload import aes_decode class m3u8down(object): def __init__(self, url, listheaders, dicheaders): self.url = url # 这里的url是index.m3u8地址 self.headers = listheaders self.header = dicheaders self.ts_parts = [] self.down_path = 'D:/workspace/download/Mp4' self.tsthreads = [] self.key = None def aes_decode(self, data, key): """AES解密 :param key: 密钥(16.32)一般16的倍数 :param data: 要解密的数据 :return: 处理好的数据 """ cryptor = AES.new(key, AES.MODE_CBC, key) plain_text = cryptor.decrypt(data) return plain_text.rstrip(b'\0') # .decode("utf-8") def to_ts(self): requests.packages.urllib3.disable_warnings() content_all = requests.get(self.url, v
ts 视频下载
最新推荐文章于 2023-11-06 23:12:01 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)