source: titan/mediathek/localhoster/flashx.py @ 44494

Last change on this file since 44494 was 44494, checked in by obi, 3 years ago

fix flashx

File size: 749 bytes
Line 
1
2import re, time
3from lib import jsunpack
4import sys
5from lib.net import Net
6import lib.common as common
7import urllib2
8
9class FlashxResolver(object):
10    name = "flashx"
11    domains = ["flashx.tv"]
12    pattern = '(?://|\.)(flashx\.tv)/(?:embed-|dl\?|embed.php\?c=)?([0-9a-zA-Z/-]+)'
13
14    def __init__(self):
15        self.net = Net()
16        url = str(sys.argv[1])
17        return self.get_media_url(url)
18
19    def get_media_url(self, url):
20        html = self.net.http_GET(url).content
21        js_data = re.findall('(eval\(function.*?)</script>', html.replace('\n', ''))
22 
23        for i in js_data:
24            try: html += jsunpack.unpack(i)
25            except: pass
26        print "html", html
27                       
28sys.stdout = FlashxResolver()
Note: See TracBrowser for help on using the repository browser.