From 86666c83f66c205f5b60346cf2e0cd3566011a47 Mon Sep 17 00:00:00 2001 From: quoije Date: Sun, 23 Oct 2022 23:56:03 -0400 Subject: [PATCH] AngelThump --- AngelThump2VLC.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 AngelThump2VLC.py diff --git a/AngelThump2VLC.py b/AngelThump2VLC.py new file mode 100644 index 0000000..1ce20f1 --- /dev/null +++ b/AngelThump2VLC.py @@ -0,0 +1,29 @@ +from requests import get +from requests import post +import argparse +import json +import subprocess + +parser = argparse.ArgumentParser() +parser.add_argument("-c", help = "AngelThump channel name") +args = parser.parse_args() + +def getToken(): + print("[+] getting token") + endpoint = 'https://vigor.angelthump.com/' + args.c + '/token' + jHeaders = {"Content-Type": "application/json", "Identifier": "SwnpX0RnA99YdRj0SPqs"} + payload = {} + r = post(endpoint, json=payload, headers=jHeaders) + return json.loads(r.text)["token"] + +def getHLS(): + endpoint = 'https://vigor.angelthump.com/hls/' + args.c + '.m3u8?token=' + getToken() + return endpoint + +def playVLC(): + subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS()]) + +if args.c: + print("[+] channel: % s" % args.c) + playVLC() + print("[+] opening VLC")