mirror of
https://gitgud.io/Melon__Bread/auto-ttv-grabber.git
synced 2024-11-24 16:28:30 -05:00
Compare commits
3 Commits
d519900ba8
...
91582c67bd
Author | SHA1 | Date | |
---|---|---|---|
91582c67bd | |||
bd874d7245 | |||
fe61cdf07e |
29
main.py
29
main.py
@ -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 = []
|
||||||
@ -54,32 +53,20 @@ def write_log(channel):
|
|||||||
|
|
||||||
def download_stream(channel):
|
def download_stream(channel):
|
||||||
"""Downloads a given channel name in its own subprocess"""
|
"""Downloads a given channel name in its own subprocess"""
|
||||||
|
# TODO: Just clean this up at somepoint
|
||||||
addtional_parms = ""
|
addtional_parms = ""
|
||||||
if skip_ads:
|
if skip_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"
|
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} --loglevel none --retry-max 10 {addtional_parms} -o {download_location}/{channel}/{file_name} twitch.tv/{channel} best"
|
||||||
# f"{streamlink_location}",
|
|
||||||
# "--loglevel none",
|
|
||||||
# "--retry-max 10",
|
|
||||||
# f"{addtional_parms}",
|
|
||||||
# f"-o {download_location}/{channel}/{file_name}",
|
|
||||||
# f"twitch.tv/{channel}",
|
|
||||||
# "best",
|
|
||||||
# ]
|
|
||||||
# print(cmd)
|
|
||||||
downloading[channel] = subprocess.Popen(
|
downloading[channel] = subprocess.Popen(
|
||||||
[
|
[cmd],
|
||||||
f"{streamlink_location}",
|
shell=True,
|
||||||
"--loglevel none",
|
start_new_session=True,
|
||||||
"--retry-max 10",
|
stdout=subprocess.PIPE,
|
||||||
f"{addtional_parms}",
|
stderr=subprocess.STDOUT,
|
||||||
f"-o {download_location}/{channel}/{file_name}",
|
|
||||||
"twitch.tv/ActionButton",
|
|
||||||
"best",
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
# write_log(channel)
|
write_log(channel)
|
||||||
|
|
||||||
|
|
||||||
def check_system():
|
def check_system():
|
||||||
|
Loading…
Reference in New Issue
Block a user