Changeset 39076 for titan/mediathek/localhoster/flashx.py
- Timestamp:
- 09/29/16 02:08:25 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/flashx.py
r39075 r39076 62 62 except: pass 63 63 64 stream = re.search('file:"([^"]*/high.*)",label', html).group(1) 65 if stream: 66 print stream 67 else: 68 stream = re.search('file:"([^"]*/normal.*)",label', html).group(1) 69 if stream: 70 print stream 71 else: 72 stream = re.search('file:"([^"]*/low.*)",label', html).group(1) 73 if stream: 74 print stream 75 else: 76 stream = re.search('file:"([^"]*)",label', html).group(1) 77 if stream: 78 print stream 64 print self.get_best_source(html) 79 65 80 66 def get_url(self, host, media_id): 81 67 return 'http://www.flashx.tv/%s.html' % media_id 82 68 69 70 def get_best_source(self, html): 71 stream = re.search('file:"([^"]*/high.*)",label', html) 72 if stream: 73 return re.search('file:"([^"]*/high.*)",label', html).group(1) 74 else: 75 stream = re.search('file:"([^"]*/normal.*)",label', html) 76 if stream: 77 return re.search('file:"([^"]*/normal.*)",label', html).group(1) 78 else: 79 stream = re.search('file:"([^"]*/low.*)",label', html) 80 if stream: 81 return re.search('file:"([^"]*/low.*)",label', html).group(1) 82 else: 83 stream = re.search('file:"([^"]*)",label', html) 84 if stream: 85 return re.search('file:"([^"]*)",label', html).group(1) 86 83 87 sys.stdout = FlashxResolver()
Note: See TracChangeset
for help on using the changeset viewer.