This commit is contained in:
sShemet
2025-12-31 16:57:55 +05:00
parent ade2833df7
commit d114970eec
8 changed files with 149 additions and 208 deletions

9
huy.py
View File

@@ -21,7 +21,7 @@ from zoneinfo import *
from http.server import BaseHTTPRequestHandler, HTTPServer
import pytchat
import telegram
from donationalerts import DonationAlertsAPI, Scope
from donationalerts import DonationAlertsAPI, Scopes
from urllib import parse
sys.path.append('twitchchatirc')
import twitch
@@ -37,8 +37,7 @@ alerts = DonationAlertsAPI(
config['Alerts']['api_key'],
"http://127.0.0.1:8008/login",
[
Scope.OAUTH_USER_SHOW,
Scope.OAUTH_DONATION_INDEX
Scopes.USER_SHOW,
]
)
@@ -52,7 +51,7 @@ class DateTimeEncoder(json.JSONEncoder):
return json.JSONEncoder.default(self, o)
chat = pytchat.create(video_id=config['Youtube']['video_id'])
# chat = pytchat.create(video_id=config['Youtube']['video_id'])
# twitchConn = twitch_chat_irc.TwitchChatIRC()
@@ -176,7 +175,7 @@ def makeJSONObject(): #we are parsing TG and YT
tw_comments = twitch_socket.all_messages
get_yt() #Get YouTube
# get_yt() #Get YouTube
try:
get_alerts() #Get Donations