Hell transfer

This commit is contained in:
Rain Clark 2024-04-06 21:04:41 -04:00
parent d519900ba8
commit fe61cdf07e

22
main.py
View File

@ -7,7 +7,6 @@ import sys
import time import time
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
import requests import requests
channel_list = [] channel_list = []
@ -59,15 +58,14 @@ def download_stream(channel):
addtional_parms = "--twitch-proxy-playlist=https://lb-eu.cdn-perfprod.com,https://lb-eu2.cdn-perfprod.com,https://lb-na.cdn-perfprod.com,https://lb-as.cdn-perfprod.com,https://as.luminous.dev --twitch-disable-ads" addtional_parms = "--twitch-proxy-playlist=https://lb-eu.cdn-perfprod.com,https://lb-eu2.cdn-perfprod.com,https://lb-na.cdn-perfprod.com,https://lb-as.cdn-perfprod.com,https://as.luminous.dev --twitch-disable-ads"
file_name = f"{channel}_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.ts" file_name = f"{channel}_{datetime.now().strftime('%Y-%m-%d_%H-%M-%S')}.ts"
# cmd = [ # cmd = [
# f"{streamlink_location}", # f"{streamlink_location} --loglevel none --retry-max 10 {addtional_parms} -o {download_location}/{channel}/{file_name} twitch.tv/{channel} best",
# "--loglevel none",
# "--retry-max 10",
# f"{addtional_parms}",
# f"-o {download_location}/{channel}/{file_name}",
# f"twitch.tv/{channel}",
# "best",
# ] # ]
# print(cmd) # with open("test.text", "w") as file:
# print(cmd)
# print(" ".join(cmd))
# file.write(" ".join(cmd))
# subprocess.run(cmd, shell=True)
downloading[channel] = subprocess.Popen( downloading[channel] = subprocess.Popen(
[ [
f"{streamlink_location}", f"{streamlink_location}",
@ -75,10 +73,12 @@ def download_stream(channel):
"--retry-max 10", "--retry-max 10",
f"{addtional_parms}", f"{addtional_parms}",
f"-o {download_location}/{channel}/{file_name}", f"-o {download_location}/{channel}/{file_name}",
"twitch.tv/ActionButton", f"twitch.tv/{channel}",
"best", "best",
] ],
shell=True,
) )
# write_log(channel) # write_log(channel)