Exemplo n.º 1
0
 def __init__(self):
     self._wkey_patterns = [re.compile('\'key\'\s+:\s+\'(\w+)\''), re.compile('_playKey = \'([a-zA-Z0-9+/=]+)\',')]
     self._ua = 'Mozilla/5.0 (Linux; Android 4.4.2; GT-I9505 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36'
     self._xml_url = "http://www.wasu.cn/Api/getPlayInfoById/id/%s/datatype/xml" 
     self._enc_url = "http://www.wasu.cn/Api/getVideoUrl/id/%s/key/%s?url=%s"
     self._httpcli = HttpDownload()
     self._hdd = {'hd0':'normal', 'hd1':'high', 'hd2':'super'}
     self._wasuc =  CWasuConverter()
Exemplo n.º 2
0
    def __init__(self):

        self.last_update_time = None

        self.isDomain = True
        self.pname = 'MPlayer'
        self._letvc = CLetvConverter()
        self._httpcli = HttpDownload(with_cookie=True)
        self.set_pyv8()
Exemplo n.º 3
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._url_action = "http://v.ku6.com/fetch.htm?t=getVideo4Player&vid=%s"
     self._url_real = "http://data.vod.itc.cn/?new=%s&mkey=%s&plat=17&prod=app"
     self._format = {
         u"流  畅": "fluent",
         u"标  清": "normal",
         u"高  清": "high",
         u"超  清": "super"
     }
Exemplo n.º 4
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format_map = {
         '3gphd': 'normal',
         'flv': 'normal',
         'flvhd': 'high',
         'mp4hd': 'high',
         'mp4hd2': 'super',
         'mp4hd3': 'original'
     }
     self.init()
Exemplo n.º 5
0
 def __init__(self):
     self.letvc = CLetvConverter()
     self.qqc = CQqConverter()
     self.hunantvc = CHunantvConverter()
     self.ykc = CYoukuConverter()
     self.iqiyic = CIqiyiConverter()
     self.sohuc = CSohuConverter()
     self.pptvc = CPptvConverter()
     self.wasuc = CWasuConverter()
     self.dy1905c = C1905Converter()
     self._httpcli = HttpDownload()
Exemplo n.º 6
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format_vid = {
         "normal": "norVid",
         "high": "highVid",
         "super": "superVid",
         "original": "oriVid"
     }
     self._format_vid_linda = {
         "normal": "nor",
         "high": "hig",
         "super": "sup"
     }
     self._url_action = "http://hot.vrs.sohu.com/vrs_flash.action?vid=%s"
     self._url_real = "http://data.vod.itc.cn/?new=%s&mkey=%s&plat=17&prod=app"
     self._url_action_linda = "http://m.tv.sohu.com/phone_playinfo?vid=%s&site=%s&appid=tv&plat=17&sver=1.0"
Exemplo n.º 7
0
    def __init__(self):
        self._ctx = PyV8.JSContext()
        self._ctx.enter()
        self._httpcli = HttpDownload()
        #load js
        self._js = ""
        base_dir = os.path.abspath(".")
        filename = base_dir + "/js/youku.js"
        jsfile = open(filename)
        #jsfile = open('/tmp/crack_server/cracker/youku.js')
        try:
            self._js = jsfile.read()
        finally:
            jsfile.close()

        self._func = self._ctx.eval(self._js)
Exemplo n.º 8
0
    def __init__(self):
        #self._ctx = PyV8.JSContext()
        #self._ctx.enter()
        #load js
        self._js = ""
        base_dir = os.path.abspath(".")
        filename = base_dir + "/js/iqiyi.js"
        #filename = base_dir + "/js/test.js"
        self._phantomjs_cmd = "/home/wangchao/phantomjs-2.1.1-linux-x86_64/bin/phantomjs ./phantomjs/iqiyi.js %s %s"
        jsfile = open(filename)
        try:
            self._js = jsfile.read()
        finally:
            jsfile.close()

        #self._func = self._ctx.eval(self._js)
        self._iqiyivc = CIqiyiConverter()
        self._httpcli = HttpDownload()
Exemplo n.º 9
0
    def __init__(self, host, port, timeout):
        self._did = "02fcd60b280ca68dee0d0d8cb30be840"
        self._api_key = "qwer3as2jin4fdsa"
        self._format_map = {
            "normal": "3gphd",
            "high": {
                "flv": "flv",
                "mp4": "mp4"
            },
            "super": "hd2"
        }
        self._details = {}
        self._redis = RedisMgr(cs.redis_ip, cs.redis_port, cs.redis_pwd)
        self._httpcli = HttpDownload()

        tmp_timeout = int(timeout / 1000)
        if tmp_timeout > 1:
            self._timeout = tmp_timeout
        else:
            self._timeout = 1
Exemplo n.º 10
0
 def __init__(self):
     self._httpcli = HttpDownload()
Exemplo n.º 11
0
 def __init__(self):
     self._httpcli = HttpDownload(with_cookie=True)
     self._url_action = "http://m.tv.sohu.com/phone_playinfo?vid=%s&site=2"
     self._url_list = "http://data.vod.itc.cn/cdnList?%s&vid=%s_2&prod=flash&rb=1"
     self._ua = "Mozilla/5.0 (Linux; Android 4.3; Nexus 10 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Safari/537.36"
     self._formats = {"hig": "high", "nor": "normal", "sup": "super"}
Exemplo n.º 12
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format_map = {1: 'normal', 2: 'high', 3: 'super'}
Exemplo n.º 13
0
 def __init__(self, *args, **kwargs):
     self.b2f = {1: 'fluent', 2: 'high', 4: 'super', 5: 'original'}
     # self.salt = "6ab6d0280511493ba85594779759d4ed"
     self._redis = RedisMgr(cs.redis_ip, cs.redis_port, cs.redis_pwd)
     self._httpcli = HttpDownload()
Exemplo n.º 14
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format = 'high'
Exemplo n.º 15
0
 def __init__(self):
     self._api_url = "http://web-play.pptv.com/webplay3-0-%s.xml?version=4&type=web.fpp"
     self._real_url = "http://%s/%s/%s?fpp.ver=1.3.0.19&k=%s&type=web.fpp"
     self._all_format = ['fluent', 'high', 'super', 'original']
     #self._all_format = ['fluent', 'high', 'super', 'original', 'original_high']
     self._httpcli = HttpDownload()
Exemplo n.º 16
0
 def __init__(self):
     self._api_url = 'http://mobile.api.hunantv.com/v5/video/getSource?appVersion=4.6.7&osType=android&videoId=%s'
     self._httpcli = HttpDownload()
Exemplo n.º 17
0
 def get_js():
     http_client = HttpDownload()
     body = '{"vid": "letv","url": "http://www.letv.com/ptv/vplay/21768679.html","site": "letv","os": "web" }'
     url = 'http://192.168.16.113:8088/crack?parsestr=js'
     result = http_client.post_data(url, body)
     return result
Exemplo n.º 18
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format_map = {1: "normal", 2: "high", 4: "super"}
Exemplo n.º 19
0
 def __init__(self):
     self._httpcli = HttpDownload()
     self._format_map = {'VideoPlayUrl': 'normal', 'VideoPlayUrlH': 'high'}
     self._format_map1 = {'350k': 'normal', '500k': 'high'}