some fixes
This commit is contained in:
parent
c49ba072c1
commit
77fe8ad53b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
list.sh
|
||||
conf_python.py
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +0,0 @@
|
||||
{
|
||||
"python.pythonPath": "/bin/python"
|
||||
}
|
2
check.sh
2
check.sh
@ -13,5 +13,5 @@ source /opt/downloader/list.sh
|
||||
|
||||
#set pid and start downloading
|
||||
touch $path/$1/pid
|
||||
/home/ubuntu/.local/bin/youtube-dl -v -o $path/$1/"%(uploader)s__%(upload_date)s_%(timestamp)s__%(title)s_%(id)s.%(ext)s" twitch.tv/$1 > $path/$1/youtube-dl.log
|
||||
/home/ubuntu/.local/bin/youtube-dl -v -o $path/$1/"%(upload_date)s_%(title)s__%(timestamp)s_%(id)s.%(ext)s" twitch.tv/$1 >> $path/$1/youtube-dl.log
|
||||
rm $path/$1/pid
|
||||
|
2
conf_python.py.template
Normal file
2
conf_python.py.template
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/python3
|
||||
twitchid=""
|
3
lifeChk.py
Normal file → Executable file
3
lifeChk.py
Normal file → Executable file
@ -3,11 +3,12 @@
|
||||
# return 0 if streamer is live (continue exec while in bash), 1 if not
|
||||
#################
|
||||
import sys
|
||||
import conf_python
|
||||
#if not sys.argv[1]:
|
||||
# sys.exit(2)
|
||||
|
||||
from twitch import TwitchClient
|
||||
twitchid = "59hrsplx7dmvc17pqkqcm9l3n1uzc4"
|
||||
|
||||
client = TwitchClient(client_id=twitchid) #client init
|
||||
user_id=client.users.translate_usernames_to_ids(sys.argv[1])[0].id #get id
|
||||
#get live by id (if var not empty)
|
||||
|
Loading…
Reference in New Issue
Block a user