This commit is contained in:
quoije
2022-10-25 21:12:15 -04:00
parent 9f0c2f72b2
commit 4650874883
+23 -18
View File
@@ -6,8 +6,8 @@ import json
import subprocess import subprocess
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("-c", help = "AngelThump channel name") parser.add_argument("-c", help = "[+] AngelThump channel name")
parser.add_argument("-t", help = "get title", action='store_true') parser.add_argument("-t", help = "[+] getting title for windowsmoviehouse channel", action='store_true')
args = parser.parse_args() args = parser.parse_args()
def getAT(): def getAT():
@@ -25,36 +25,41 @@ def getATTitleYear():
s = getAT().body.find('div', attrs={'id':'title'}).text s = getAT().body.find('div', attrs={'id':'title'}).text
return s[s.find('(')+1:s.find(')')] return s[s.find('(')+1:s.find(')')]
def getToken(): def getToken(channel):
print("[+] getting token") print("[++] getting token")
endpoint = 'https://vigor.angelthump.com/' + args.c + '/token' endpoint = 'https://vigor.angelthump.com/' + channel + '/token'
jHeaders = {"Content-Type": "application/json", "Identifier": "SwnpX0RnA99YdRj0SPqs"} jHeaders = {"Content-Type": "application/json", "Identifier": "SwnpX0RnA99YdRj0SPqs"}
r = post(endpoint, headers=jHeaders) r = post(endpoint, headers=jHeaders)
return json.loads(r.text)["token"] return json.loads(r.text)["token"]
def getHLS(): def getHLS(channel):
endpoint = 'https://vigor.angelthump.com/hls/' + args.c + '.m3u8?token=' + getToken() endpoint = 'https://vigor.angelthump.com/hls/' + channel + '.m3u8?token=' + getToken(channel)
return endpoint return endpoint
def playVLC(): def playVLC(channel):
subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS(), "--qt-minimal-view"]) subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS(channel), "--qt-minimal-view"])
def ayyLmao(): def ayyLmao():
print("[+] getting title") print("[+] getting title for windowsmoviehouse channel")
print("[+] -----------------------") print("[++] -----------------------")
print("[+] "+ ogTitle + " - " + getATTitleYear() + " (" + ogRuntime + ")") print("[++] "+ ogTitle + " - " + getATTitleYear() + " (" + ogRuntime + ")")
print("[+] Start: "+ ogStart) print("[++] Start: "+ ogStart)
print("[+] End: "+ ogEnd) print("[++] End: "+ ogEnd)
print("[+] Overview: "+ ogOverview) print("[++] Overview: "+ ogOverview)
print("[+] -----------------------") print("[++] -----------------------")
if args.c: if args.c:
print("[+] channel: % s" % args.c) print("[+] channel: % s" % args.c)
if args.c == "windowsmoviehouse": if args.c == "windowsmoviehouse":
ayyLmao() ayyLmao()
playVLC() playVLC(args.c)
print("[+] opening VLC") print("[++] opening VLC")
elif args.t: elif args.t:
ayyLmao() ayyLmao()
else: else:
print("[+] you need to input a channel name bozo '-c'") print("[+] you need to input a channel name bozo '-c'")
print("[++] ..........................................")
print("[+] default channel then: windowsmoviehouse")
ayyLmao()
playVLC("windowsmoviehouse")
print("[++] opening VLC")