Changeset 39362 for titan/mediathek/localhoster/vidzi.py
- Timestamp:
- 11/19/16 22:12:41 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/vidzi.py
r39354 r39362 27 27 28 28 def get_media_url(self, host, media_id): 29 web_url = self.get_url(host, media_id) 30 html = self.net.http_GET(web_url).content 31 32 if '404 Not Found' in html: 33 print 'File Not Found or removed' 34 35 r = re.search('file\s*:\s*"([^"]+)', html) 36 if r: 37 return r.group(1) + '|' + urllib.urlencode({'Referer': 'http://vidzi.tv/nplayer/jwplayer.flash.swf'}) 38 else: 39 for match in re.finditer('(eval\(function.*?)</script>', html, re.DOTALL): 40 js_data = jsunpack.unpack(match.group(1)) 41 r = re.search('file\s*:\s*"([^"]+)', js_data) 42 if r: 43 print r.group(1) 44 45 # print 'Unable to locate link' 29 return helpers.get_media_url(self.get_url(host, media_id)) 46 30 47 31 def get_url(self, host, media_id):
Note: See TracChangeset
for help on using the changeset viewer.