From eb56370fa26865f04a85565b804c065fa04b814a Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 2 Mar 2018 10:24:25 -0500 Subject: [PATCH] Updated sproutvideo.com --- sproutvideo.com/run.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/sproutvideo.com/run.py b/sproutvideo.com/run.py index fe1086f..3299f8b 100644 --- a/sproutvideo.com/run.py +++ b/sproutvideo.com/run.py @@ -19,13 +19,23 @@ headers = { "Referer": args.url } +if args.user: -payload = {"email": args.user if args.user is not None else "", "password": args.password, - "host": "unknown", "url": "unknown", "queryParams": ""} -r = requests.post(args.url.replace("embed", "video_password"), headers=headers, data=payload) + payload = {"email": args.user, "password": args.password, "host": "unknown", "url": "unknown", + "params": "host=unknown&url=unknown"} + + url = args.url.replace("embed", "videos") + url = url[:url.rfind("/")+1] + url += "video_login?embed=true" + + r = requests.post(url, headers=headers, data=payload) + +else: + + payload = {"password": args.password, "host": "unknown", "url": "unknown", "queryParams": ""} + r = requests.post(args.url.replace("embed", "video_password"), headers=headers, data=payload) soup = BeautifulSoup(r.text, "html.parser") - try: print(soup.find("a", attrs={"class": "hd-download"}).get("href")) # print(soup.find("a", attrs={"class": "sd-download"}).get("href"))