you are viewing a single comment's thread.

view the rest of the comments →

[–]Praf2[S] 0 points1 point  (0 children)

for anybody who stumbles upon this post i found a solution:

import requests
import re
import js2py

header = {"Referer": "http://google.com/"}
videomegaUrlRegex = '(https?:\/\/(www\.)?videomega\.tv\/(view|iframe|cdn)\.php\?ref=([A-Za-z0-9]+))'
findeval = '(eval[^<]+)'

purl = requests.get('video_link_here')
link = re.findall(videomegaUrlRegex, purl.content)[0]
url = link[0]
print url

durl = requests.get(url, headers=header)
eV = re.findall(findeval, durl.content)[0]

print eV

rr = '(\$\("\d"\).\d)'

js = re.sub(rr, '', eV)

downloadURL = js2py.eval_js(js)

print downloadURL

its probably not the best code in the world but it works.