def sources(self, url, hostDict, hostprDict): try: sources = [] if url is None: return sources data = urlparse.parse_qs(url) data = dict([(i, data[i][0]) if data[i] else (i, '') for i in data]) aliases = eval(data['aliases']) headers = {} if 'tvshowtitle' in data: episode = int(data['episode']) url = self.searchShow(data['tvshowtitle'], data['season'], aliases, headers) else: episode = 0 url = self.searchMovie(data['title'], data['year'], aliases, headers) mid = re.findall('-(\d+)', url)[-1] try: headers = {'Referer': url} u = urlparse.urljoin(self.base_link, self.server_link % mid) r = client.request(u, headers=headers, XHR=True) r = json.loads(r)['html'] r = client.parseDOM(r, 'div', attrs = {'class': 'pas-list'}) ids = client.parseDOM(r, 'li', ret='data-id') servers = client.parseDOM(r, 'li', ret='data-server') labels = client.parseDOM(r, 'a', ret='title') r = zip(ids, servers, labels) for eid in r: try: try: ep = re.findall('episode.*?(\d+).*?',eid[2].lower())[0] except: ep = 0 if (episode == 0) or (int(ep) == episode): url = urlparse.urljoin(self.base_link, self.token_link % (eid[0], mid)) script = client.request(url) if '$_$' in script: params = self.uncensored1(script) elif script.startswith('[]') and script.endswith('()'): params = self.uncensored2(script) elif '_x=' in script: x = re.search('''_x=['"]([^"']+)''', script).group(1) y = re.search('''_y=['"]([^"']+)''', script).group(1) params = {'x': x, 'y': y} else: raise Exception() u = urlparse.urljoin(self.base_link, self.source_link % (eid[0], params['x'], params['y'])) r = client.request(u, XHR=True) url = json.loads(r)['playlist'][0]['sources'] url = [i['file'] for i in url if 'file' in i] url = [directstream.googletag(i) for i in url] url = [i[0] for i in url if i] for s in url: if 'lh3.googleusercontent.com' in s['url']: s['url'] = directstream.googleredirect(s['url']) sources.append({'source': 'gvideo', 'quality': s['quality'], 'language': 'en', 'url': s['url'], 'direct': True, 'debridonly': False}) except: pass except: pass return sources except: return sources
def sources(self, url, hostDict, hostprDict): try: sources = [] if url is None: return sources data = urlparse.parse_qs(url) data = dict([(i, data[i][0]) if data[i] else (i, '') for i in data]) aliases = eval(data['aliases']) headers = {} if 'tvshowtitle' in data: episode = int(data['episode']) url = self.searchShow(data['tvshowtitle'], data['season'], aliases, headers) else: episode = 0 url = self.searchMovie(data['title'], data['year'], aliases, headers) mid = re.findall('-(\d+)', url)[-1] try: headers = {'Referer': url} u = urlparse.urljoin(self.base_link, self.server_link % mid) r = client.request(u, headers=headers, XHR=True) r = json.loads(r)['html'] r = client.parseDOM(r, 'div', attrs={'class': 'pas-list'}) ids = client.parseDOM(r, 'li', ret='data-id') servers = client.parseDOM(r, 'li', ret='data-server') labels = client.parseDOM(r, 'a', ret='title') r = zip(ids, servers, labels) u = urlparse.urljoin(self.base_link, self.info_link % mid) quality = client.request(u, headers=headers) quality = dom_parser.parse_dom(quality, 'div', attrs={'class': 'jtip-quality' })[0].content if quality == "HD": quality = "720p" for eid in r: try: try: ep = re.findall('episode.*?(\d+).*?', eid[2].lower())[0] except: ep = 0 if (episode == 0) or (int(ep) == episode): if eid[1] != '6': url = urlparse.urljoin( self.base_link, self.embed_link % eid[0]) link = client.request(url) link = json.loads(link)['src'] valid, host = source_utils.is_host_valid( link, hostDict) sources.append({ 'source': host, 'quality': quality, 'language': 'en', 'url': link, 'info': [], 'direct': False, 'debridonly': False }) else: url = urlparse.urljoin( self.base_link, self.token_link % (eid[0], mid)) script = client.request(url) if '$_$' in script: params = self.uncensored1(script) elif script.startswith( '[]') and script.endswith('()'): params = self.uncensored2(script) elif '_x=' in script: x = re.search('''_x=['"]([^"']+)''', script).group(1) y = re.search('''_y=['"]([^"']+)''', script).group(1) params = {'x': x, 'y': y} else: raise Exception() u = urlparse.urljoin( self.base_link, self.source_link % (eid[0], params['x'], params['y'])) r = client.request(u, XHR=True) url = json.loads(r)['playlist'][0]['sources'] url = [i['file'] for i in url if 'file' in i] url = [directstream.googletag(i) for i in url] url = [i[0] for i in url if i] for s in url: if 'lh3.googleusercontent.com' in s['url']: s['url'] = directstream.googleredirect( s['url']) sources.append({ 'source': 'gvideo', 'quality': s['quality'], 'language': 'en', 'url': s['url'], 'direct': True, 'debridonly': False }) except: pass except: pass return sources except: return sources
def sources(self, url, hostDict, hostprDict): try: sources = [] data = urlparse.parse_qs(url) data = dict((i, data[i][0]) for i in data) if 'episode' in data: url = self.__get_episode_url(data) get_body = 'type=episode&%s=%s&imd_id=%s&seasonsNo=%02d&episodesNo=%02d' else: url = self.__get_movie_url(data) response = client.request(url) url = re.findall('<iframe .+? src="(.+?)"', response)[0] response = client.request(url) token = re.findall('var tc = \'(.+?)\'', response)[0] seeds = re.findall( '_tsd_tsd\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)";', response)[0] pair = re.findall('\'type\': \'.+\',\s*\'(.+?)\': \'(.+?)\'', response)[0] header_token = self.__xtoken(token, seeds) body = 'tokenCode=' + token headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'x-token': header_token } url = urlparse.urljoin(self.source_link, self.decode_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: if 'vidushare.com' in source: sources.append({ 'source': 'CDN', 'quality': 'HD', 'language': 'en', 'url': source, 'direct': True, 'debridonly': False }) except Exception: pass body = get_body % (pair[0], pair[1], data['imdb'], int(data['season']), int(data['episode'])) url = urlparse.urljoin(self.source_link, self.grabber_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: quality = source_utils.label_to_quality(source['label']) link = source['file'] if 'lh3.googleusercontent' in link: link = directstream.googleredirect(link) sources.append({ 'source': 'gvideo', 'quality': quality, 'language': 'en', 'url': link, 'direct': True, 'debridonly': False }) except Exception: pass return sources except: return sources
def sources(self, url, hostDict, hostprDict): try: sources = [] data = urlparse.parse_qs(url) data = dict((i, data[i][0]) for i in data) if 'episode' in data: url = self.__get_episode_url(data) get_body = 'type=episode&%s=%s&imd_id=%s&seasonsNo=%02d&episodesNo=%02d' else: url = self.__get_movie_url(data) response = client.request(url) url = re.findall('<iframe .+? src="(.+?)"', response)[0] response = client.request(url) token = re.findall('var tc = \'(.+?)\'', response)[0] # _tsd_tsd_ds(s) ~~~ .slice(3,29) ~~~~ "29"+"341404"; <----- seeds phrase has changed # seeds = re.findall('_tsd_tsd\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)";', response)[0] seeds = re.findall( '_tsd_tsd_ds\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)\";', response)[0] pair = re.findall('\'type\': \'.+\',\s*\'(.+?)\': \'(.+?)\'', response)[0] header_token = self.__xtoken(token, seeds) body = 'tokenCode=' + token headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'x-token': header_token } url = self.decode_file response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) # [u'https://video.xx.fbcdn.net/v/t42.9040-2/10000000_226259417967008_8033841240334139392_n.mp4?_nc_cat=0&efg=eyJybHIiOjE1MDAsInJsYSI6NDA5NiwidmVuY29kZV90YWciOiJzdmVfaGQifQ%3D%3D&rl=1500&vabr=616&oh=27f4d11aec3aa54dbe1ca72c81fbaa03&oe=5B4C6DF5', u'https://movienightplayer.com/tt0253754', u'https://openload.co/embed/ALXqqto-fQI', u'https://streamango.com/embed/pndcsolkpnooffdk'] for source in sources_dict: try: # if 'vidushare.com' in source: if '.mp4' in source: sources.append({ 'source': 'CDN', 'quality': 'HD', 'language': 'en', 'url': source, 'direct': True, 'debridonly': False }) except Exception: pass body = get_body % (pair[0], pair[1], data['imdb'], int(data['season']), int(data['episode'])) url = urlparse.urljoin(self.source_link, self.grabber_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: quality = source_utils.label_to_quality(source['label']) link = source['file'] if 'lh3.googleusercontent' in link: link = directstream.googleredirect(link) sources.append({ 'source': 'gvideo', 'quality': quality, 'language': 'en', 'url': link, 'direct': True, 'debridonly': False }) except Exception: pass return sources except Exception: return sources
def sources(self, url, hostDict, hostprDict): try: sources = [] data = urlparse.parse_qs(url) data = dict((i, data[i][0]) for i in data) if 'episode' in data: url = self.__get_episode_url(data) get_body = 'type=episode&%s=%s&imd_id=%s&seasonsNo=%02d&episodesNo=%02d' else: url = self.__get_movie_url(data) response = client.request(url) url = re.findall('<iframe .+? src="(.+?)"', response)[0] response = client.request(url) token = re.findall('var tc = \'(.+?)\'', response)[0] seeds = re.findall('_tsd_tsd\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)";', response)[0] pair = re.findall('\'type\': \'.+\',\s*\'(.+?)\': \'(.+?)\'', response)[0] header_token = self.__xtoken(token, seeds) body = 'tokenCode=' + token headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'x-token': header_token } url = urlparse.urljoin(self.source_link, self.decode_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: if 'vidushare.com' in source: sources.append({ 'source': 'CDN', 'quality': 'HD', 'language': 'en', 'url': source, 'direct': True, 'debridonly': False }) except Exception: pass body = get_body % (pair[0], pair[1], data['imdb'], int(data['season']), int(data['episode'])) url = urlparse.urljoin(self.source_link, self.grabber_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: quality = source_utils.label_to_quality(source['label']) link = source['file'] if 'lh3.googleusercontent' in link: link = directstream.googleredirect(link) sources.append({ 'source': 'gvideo', 'quality': quality, 'language': 'en', 'url': link, 'direct': True, 'debridonly': False }) except Exception: pass return sources except Exception: return sources
def sources(self, url, hostDict, hostprDict): try: sources = [] data = urlparse.parse_qs(url) data = dict((i, data[i][0]) for i in data) if 'episode' in data: url = self.__get_episode_url(data) get_body = 'type=episode&%s=%s&imd_id=%s&seasonsNo=%02d&episodesNo=%02d' else: url = self.__get_movie_url(data) response = client.request(url) url = re.findall('<iframe .+? src="(.+?)"', response)[0] response = client.request(url) token = re.findall('var tc = \'(.+?)\'', response)[0] # _tsd_tsd_ds(s) ~~~ .slice(3,29) ~~~~ "29"+"341404"; <----- seeds phrase has changed # seeds = re.findall('_tsd_tsd\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)";', response)[0] seeds = re.findall('_tsd_tsd_ds\(s\) .+\.slice\((.+?),(.+?)\).+ return .+? \+ \"(.+?)\"\+\"(.+?)\";', response)[0] pair = re.findall('\'type\': \'.+\',\s*\'(.+?)\': \'(.+?)\'', response)[0] header_token = self.__xtoken(token, seeds) body = 'tokenCode=' + token headers = { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'x-token': header_token } url = self.decode_file response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) # [u'https://video.xx.fbcdn.net/v/t42.9040-2/10000000_226259417967008_8033841240334139392_n.mp4?_nc_cat=0&efg=eyJybHIiOjE1MDAsInJsYSI6NDA5NiwidmVuY29kZV90YWciOiJzdmVfaGQifQ%3D%3D&rl=1500&vabr=616&oh=27f4d11aec3aa54dbe1ca72c81fbaa03&oe=5B4C6DF5', u'https://movienightplayer.com/tt0253754', u'https://openload.co/embed/ALXqqto-fQI', u'https://streamango.com/embed/pndcsolkpnooffdk'] for source in sources_dict: try: # if 'vidushare.com' in source: if '.mp4' in source: sources.append({ 'source': 'CDN', 'quality': 'HD', 'language': 'en', 'url': source, 'direct': True, 'debridonly': False }) except Exception: pass body = get_body % (pair[0], pair[1], data['imdb'], int(data['season']), int(data['episode'])) url = urlparse.urljoin(self.source_link, self.grabber_file) response = client.request(url, XHR=True, post=body, headers=headers) sources_dict = json.loads(response) for source in sources_dict: try: quality = source_utils.label_to_quality(source['label']) link = source['file'] if 'lh3.googleusercontent' in link: link = directstream.googleredirect(link) sources.append({ 'source': 'gvideo', 'quality': quality, 'language': 'en', 'url': link, 'direct': True, 'debridonly': False }) except Exception: pass return sources except Exception: return sources