source: titan/mediathek/localhoster/bs.py

Last change on this file was 40939, checked in by obi, 4 years ago

tithek fix bs hosts

File size: 1.0 KB
Line 
1
2import re, time
3from lib import jsunpack
4import sys
5from lib.net import Net
6import lib.common as common
7from lib.bs_finalizer import *
8
9class BsResolver(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#        print "1111111111111"
16        self.net = Net()
17#        print "2222222222222"
18
19        url = str(sys.argv[1])
20#        print "3333333333333"
21
22 #       host = self.get_host_and_id(url)[0]
23#        print "4444444444444"
24
25 #       media_id = self.get_host_and_id(url)[1]
26#        print "5555555555555"
27
28#        mod_request(request, urlPart)
29#        mod_request("request", url)
30#       curl -L -H "BS-Token:JwdWJsaWNfa2V5IjogIlVQUEthT2UxVm9zcU1iY0ZEUWVNZnN4MDI1QUEzQnVjIiwgImhtYWMiOiAiNDA4NzU2ZTMyNzhkZGUwZDVhZGQyMzMxMzNkZTYwM2RhZGEwN2I5MDU5MmM0MDM0OGQ2ZDQwYzdkYjNjZDI4ZSIsICJ0aW1lc3RhbXAiOiAxNTA0OTc4MjcyfQ==" https://www.bs.to/api/watch/2977318
31
32        return mod_request("request", url)
33
34sys.stdout = BsResolver()
Note: See TracBrowser for help on using the repository browser.