From 2bbbe27bf69718c9cb7ede3f1d52c4f5ac6a6ad9 Mon Sep 17 00:00:00 2001 From: quoije Date: Tue, 25 Oct 2022 01:34:05 -0400 Subject: [PATCH] oof --- AngelThump2VLC.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/AngelThump2VLC.py b/AngelThump2VLC.py index c7a59bd..e2d7066 100644 --- a/AngelThump2VLC.py +++ b/AngelThump2VLC.py @@ -1,4 +1,6 @@ +from bs4 import BeautifulSoup from requests import post +from requests import get import argparse import json import subprocess @@ -7,6 +9,20 @@ parser = argparse.ArgumentParser() parser.add_argument("-c", help = "AngelThump channel name") args = parser.parse_args() +def getAT(): + endpoint = 'https://beta.watchw.me/' + r = get(endpoint) + return BeautifulSoup(r.text, 'html.parser') + +ogTitle = getAT().body.find('div', attrs={'id':'original-title'}).text +ogStart = getAT().body.find('div', attrs={'id':'start'}).text +ogEnd = getAT().body.find('div', attrs={'id':'end'}).text +ogRuntime = getAT().body.find('div', attrs={'id':'runtime'}).text + +def getATTitleYear(): + s = getAT().body.find('div', attrs={'id':'title'}).text + return s[s.find('(')+1:s.find(')')] + def getToken(): print("[+] getting token") endpoint = 'https://vigor.angelthump.com/' + args.c + '/token' @@ -23,5 +39,12 @@ def playVLC(): if args.c: print("[+] channel: % s" % args.c) - playVLC() + if args.c == "windowsmoviehouse": + print("[+] getting title") + print("[+] "+ ogTitle + " - " + getATTitleYear() + " (" + ogRuntime + ")") + print("[+] Start: "+ ogStart) + print("[+] End: "+ ogEnd) + # playVLC() print("[+] opening VLC") +else: + print("[+] you need to input a channel name bozo '-c'")