mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 12:05:35 +00:00
fix cant unpack
This commit is contained in:
parent
dee1eeec09
commit
74c3dd8db7
@ -107,9 +107,10 @@ def get_m3u8_playlist(json_win_video, json_win_param, tv_name, n_stagione, n_ep,
|
|||||||
|
|
||||||
if req.ok:
|
if req.ok:
|
||||||
m3u8_cont = req.text.split()
|
m3u8_cont = req.text.split()
|
||||||
|
|
||||||
for row in m3u8_cont:
|
for row in m3u8_cont:
|
||||||
if "audio" in str(row) and "ita" in str(row):
|
if "audio" in str(row) and "ita" in str(row):
|
||||||
return row.split(",")[-1].split('"')[-2], req.text
|
return row.split(",")[-1].split('"')[-2]
|
||||||
else:
|
else:
|
||||||
console.log(f"[red]Error: {req.status_code}")
|
console.log(f"[red]Error: {req.status_code}")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
@ -132,12 +133,12 @@ def dw_single_ep(tv_id, eps, index_ep_select, domain, token, tv_name, season_sel
|
|||||||
mp4_format = mp4_name + ".mp4"
|
mp4_format = mp4_name + ".mp4"
|
||||||
mp4_path = os.path.join("videos", mp4_format)
|
mp4_path = os.path.join("videos", mp4_format)
|
||||||
|
|
||||||
m3u8_url_audio, m3u8_playlist_content = get_m3u8_playlist(json_win_video, json_win_param, tv_name, season_select, index_ep_select+1, eps[index_ep_select]['name'], token_render)
|
m3u8_url_audio = get_m3u8_playlist(json_win_video, json_win_param, tv_name, season_select, index_ep_select+1, eps[index_ep_select]['name'], token_render)
|
||||||
|
|
||||||
if m3u8_url_audio != None:
|
if m3u8_url_audio != None:
|
||||||
console.print("[blue]Use m3u8 audio => [red]True")
|
console.print("[blue]Use m3u8 audio => [red]True")
|
||||||
|
|
||||||
download_m3u8(m3u8_playlist=m3u8_playlist_content, m3u8_index=m3u8_url, m3u8_audio=m3u8_url_audio, m3u8_subtitle=m3u8_url, key=m3u8_key, output_filename=mp4_path)
|
download_m3u8(m3u8_index=m3u8_url, m3u8_audio=m3u8_url_audio, m3u8_subtitle=m3u8_url, key=m3u8_key, output_filename=mp4_path)
|
||||||
|
|
||||||
def main_dw_tv(tv_id, tv_name, version, domain):
|
def main_dw_tv(tv_id, tv_name, version, domain):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user