Update AngelThump2VLC.py
This commit is contained in:
+7
-7
@@ -8,15 +8,15 @@ parser.add_argument("-c", help = "AngelThump channel name")
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
def getToken():
|
def getToken():
|
||||||
print("[+] getting token")
|
print("[+] getting token")
|
||||||
endpoint = 'https://vigor.angelthump.com/' + args.c + '/token'
|
endpoint = 'https://vigor.angelthump.com/' + args.c + '/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():
|
||||||
endpoint = 'https://vigor.angelthump.com/hls/' + args.c + '.m3u8?token=' + getToken()
|
endpoint = 'https://vigor.angelthump.com/hls/' + args.c + '.m3u8?token=' + getToken()
|
||||||
return endpoint
|
return endpoint
|
||||||
|
|
||||||
def playVLC():
|
def playVLC():
|
||||||
subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS()])
|
subprocess.Popen(["C:/Program Files/VideoLAN/VLC/vlc.exe",getHLS()])
|
||||||
|
|||||||
Reference in New Issue
Block a user