31 lines
1010 B
Python
31 lines
1010 B
Python
from requests import post
|
|
from requests import get
|
|
import argparse
|
|
import json
|
|
import subprocess
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("-c", help = "[+] AngelThump channel name")
|
|
args = parser.parse_args()
|
|
|
|
def getToken(channel):
|
|
print("[++] getting token")
|
|
endpoint = 'https://vigor.angelthump.com/' + channel + '/token'
|
|
jHeaders = {"Content-Type": "application/json", "Identifier": "SwnpX0RnA99YdRj0SPqs"}
|
|
r = post(endpoint, headers=jHeaders)
|
|
return json.loads(r.text)["token"]
|
|
|
|
def getHLS(channel):
|
|
endpoint = 'https://vigor.angelthump.com/hls/' + channel + '.m3u8?token=' + getToken(channel)
|
|
return endpoint
|
|
|
|
def playVLC(channel):
|
|
subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS(channel), "--qt-minimal-view"])
|
|
|
|
if args.c:
|
|
print("[+] channel: % s" % args.c)
|
|
playVLC(args.c)
|
|
print("[++] opening VLC")
|
|
else:
|
|
print("[+] you need to input a channel name bozo '-c'")
|
|
print("[++] ..........................................") |