def resolve(self, url): try: for i in range(3): u = directstream.googlepass(url) if not u == None: break return u except: return
def resolve(self, url): try: if not url.startswith('http'): url = 'http:' + url for i in range(3): u = directstream.googlepass(url) if not u == None: break return u except: return
def resolve(self, url): try: if self.embed_link in url: result = client.request(url, XHR=True) url = json.loads(result)['embed_url'] return url try: if not url.startswith('http'): url = 'http:' + url for i in range(3): u = directstream.googlepass(url) if not u == None: break return u except: return except: return
def resolve(self, url): return directstream.googlepass(url)
def sources(self, url, hostDict, hostprDict): try: sources = [] if url == None: return sources url = urlparse.urljoin(self.base_link, url) r = proxy.request(url, 'movie') d = re.findall('(/embed\d*/\d+)', r) d = [x for y,x in enumerate(d) if x not in d[:y]] s = client.parseDOM(r, 'a', ret='href') s = [proxy.parse(i) for i in s] s = [i for i in s if i.startswith('http')] s = [x for y,x in enumerate(s) if x not in s[:y]] q = re.findall('This movie is of poor quality', r) quality = 'SD' if not q else 'CAM' for i in d: try: raise Exception() if quality == 'CAM': raise Exception() url = urlparse.urljoin(self.base_link, i) url = proxy.request(url, 'movie') url = re.findall('salt\("([^"]+)', url)[0] url = self.__caesar(self.__get_f(self.__caesar(url, 13)), 13) url = re.findall('file\s*:\s*(?:\"|\')(http.+?)(?:\"|\')', url) url = [directstream.googletag(u) for u in url] url = sum(url, []) url = [u for u in url if u['quality'] in ['1080p', 'HD']] url = url[:2] for u in url: u.update({'url': directstream.googlepass(u)}) url = [u for u in url if not u['url'] == None] for u in url: sources.append({'source': 'gvideo', 'quality': u['quality'], 'language': 'en', 'url': u['url'], 'direct': True, 'debridonly': False}) except: pass for i in s: try: url = i url = client.replaceHTMLCodes(url) url = url.encode('utf-8') u = len(re.findall('((?:http|https)://)', url)) if u > 1: raise Exception() host = re.findall('([\w]+[.][\w]+)$', urlparse.urlparse(url.strip().lower()).netloc)[0] if not host in hostDict: raise Exception() host = host.encode('utf-8') sources.append({'source': host, 'quality': quality, 'language': 'en', 'url': url, 'direct': False, 'debridonly': False}) except: pass return sources except: return sources
def resolve(self, url): if "google" in url: return directstream.googlepass(url) else: return url