some fixes

This commit is contained in:
lulzette 2020-02-17 21:46:13 +03:00
parent c49ba072c1
commit 77fe8ad53b
7 changed files with 6 additions and 6 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
list.sh
conf_python.py

View File

@ -1,3 +0,0 @@
{
"python.pythonPath": "/bin/python"
}

View File

@ -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
View File

@ -0,0 +1,2 @@
#!/usr/bin/python3
twitchid=""

View File

3
lifeChk.py Normal file → Executable file
View 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)

View File

@ -1 +0,0 @@
#!/bin/python3