def get_link(self, response): movie = { 'group': {}, 'episode': [], 'links': [], } sources = re.search("var sources = (\[{.*}\]);", response) \ or re.search("var sources[\s]?=[\s]?(\[{.*}\]);var", response) if sources is not None: sources = json.loads(sources.group(1)) for source in sources: url = urllib.unquote( re.search('\?url=(.*)', source['file']).group(1)) movie['links'].append({ 'link': url, 'title': 'Link %s' % source['label'].encode('utf-8'), 'type': source['label'].encode('utf-8'), 'resolve': True }) return movie m = re.search('<iframe.*src=".*\?link=(.*)">', response) if m is not None: source = urllib.unquote(m.group(1)).replace('\\', '') if source: movie['links'].append({ 'link': source, 'title': source.encode('utf-8'), 'type': 'Unknow', 'resolve': False }) return movie print(WisePacker.decode(response)) return movie
def get_token_url(self, response): a = WisePacker.decode(response) return re.search("'url':'(.*)','method'", a).group(1).replace("ip='+window.CLIENT_IP+'&", "")
def get_decrypt_key(self, response): try: a = WisePacker.decode(response) return re.search("setDecryptKey\('(.*)'\);watching", a).group(1) except: helper.message(response, "Phimmoi", 15000)