Vidtodo script

Ballz

New member
Dec 24, 2016
2
0
0
I have put together a small python script to resolve the links from vidtodo.com

Im not sure how to make this into a urlresolver plugin, maybe someone else can add it. Works fine for all the links I pass it.

Code:
import requests, re, time

def GetVidtodo(url):
    headers = {'content-type': 'application/x-www-form-urlencoded', 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0'}
    page = requests.get(url)
    id = re.search('name="id" value="(.*?)"', page.content)
    fname = re.search('name="fname" value="(.*?)"', page.content)
    hash = re.search('name="hash" value="(.*?)"', page.content)
    data = {"op":"download1", "usr_login":"", "id":"%s" % id.group(1), "fname":"%s" % fname.group(1), "referrer":"%s" % url, "hash":"%s" % hash.group(1), "imhuman":"Proceed+to+video"}
    time.sleep(2)
    realpage = requests.post(url, data=data, headers=headers)
    rawlink = re.search('sources:.*?file.*?file: "(.*?)"', realpage.content)
    return rawlink.group(1)
Hope this helps to add another host to the resolver. :)
 

Ballz

New member
Dec 24, 2016
2
0
0
I should add the link to pass the script is
Code:
http://vidtodo.com/xxxxxxxxxxxx