芒果视频

如题所述

第1个回答  2022-06-08
import requests
import re
import os
import json

url = ' https://web-disp.titan.mgtv.com/atcl'

headers = {

}

data = {

}

filename = '哔哩哔哩视频\'
if not os.path.exists(filename):
os.mkdir(filename)

reponse = requests.get(url=url,headers=headers,params=data)

m3u8_data = requests.get(url=reponse.json()['info'],headers=headers).text

m3u8_data = re.sub('#E.*','',m3u8_data).split()

for index in m3u8_data:
ts_url = ' https://pcvideohwyunott.titan.mgtv.com/c1/2021/11/15_0/22A2CA71A3FF5097EF94512E538A60E7_20211115_1_1_341_mp4/'+index
ts_data = requests.get(url=ts_url,headers=headers).content
with open (f'{filename}/吾凰在上.mp4', mode = 'ab' ) as f:
f.write(ts_data)
相似回答
大家正在搜