def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.FF_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content if 'Not Found' in html: raise ResolverError('File Removed') if 'Video is processing' in html: raise ResolverError('File still being processed') packed = re.search(r"JuicyCodes\.Run\((.+?)\)", html, re.I) if packed: from base64 import b64decode packed = packed.group(1).replace('"', '').replace('+', '') packed = b64decode(packed.encode('ascii')) html += '%s</script>' % packed.decode('latin-1').strip() sources = helpers.scrape_sources(html) if sources: headers.update({'Referer': web_url, 'Range': 'bytes=0-'}) return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.CHROME_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content headers.update({'Referer': web_url}) if 'sorry' in html: raise ResolverError("Video Deleted") r = re.search(r"redirect_vid\('([^']+)','([^']+)','([^']+)'", html) if r: surl = 'https://{0}/dl?op=download_orig&id={1}&mode={2}&hash={3}'.format( host, r.group(1), r.group(2), r.group(3) ) dhtml = self.net.http_GET(surl, headers=headers).content s = re.search('href="([^"]+)">Direct', dhtml) if s: return s.group(1) + helpers.append_headers(headers) html += helpers.get_packed_data(html) sources = helpers.scrape_sources(html, patterns=[r'''sources:\s*\[(?:{file:)?\s*"(?P<url>[^"]+)'''], generic_patterns=False) if sources: return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError("Video not found")
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = { 'User-Agent': common.RAND_UA, 'Referer': 'https://{0}/'.format(host) } html = self.net.http_GET(web_url, headers=headers).content source = re.search(r"download_video.+?'o','([^']+)", html) if source: dl_url = 'https://{0}/dl?op=download_orig&id={1}&mode=o&hash={2}'.format( host, media_id, source.group(1)) html2 = self.net.http_GET(dl_url, headers=headers).content r = re.search(r'btn_direct-download"\s*href="([^"]+)', html2) if r: return r.group(1) + helpers.append_headers(headers) pdata = helpers.get_packed_data(html) if pdata: html = pdata sources = helpers.scrape_sources( html, patterns=[r'''{\s*file:\s*"(?P<url>[^"]+)"\s*}'''], generic_patterns=False) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if html: video_id = re.search("""playvideo\.php\?id=(\d+)""", html) if video_id: video_url = 'http://%s/jwplayer/playvideo.php?id=%s' % ( host, video_id.group(1)) headers.update({'Referer': web_url}) _html = self.net.http_GET(video_url, headers=headers).content if _html: try: _html = jsunpack.unpack(_html) except Exception as e: raise ResolverError(e) sources = helpers.scrape_sources( _html, patterns=['''file:\s*["'](?P<url>http[^"']+)''']) if sources: return helpers.pick_source( sources) + helpers.append_headers(headers) raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content try: params = "".join([ x.replace("' + '", "") for x in self.between(html, "params += '", "';") ]) vkey = params.split('=')[-1] m = hashlib.md5() m.update(vkey + 'PT6l13umqV8K827') params += '&pkey=%s' % m.hexdigest() params = urllib_parse.unquote(params) url = 'http://www.drtuber.com/player_config/?' + params sources_html = self.net.http_GET(url, headers=headers).content if sources_html: sources = helpers.scrape_sources( sources_html, patterns=[r"""video_file>\<\!\[CDATA\[(?P<url>[^\]]+)"""]) if sources: return helpers.pick_source( sources) + helpers.append_headers(headers) raise ResolverError('File not found') except: raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.FF_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content if 'Not Found' in html: raise ResolverError('File Removed') if 'Video is processing' in html: raise ResolverError('File still being processed') packed = re.search(r"JuicyCodes\.Run\((.+?)\)", html, re.I) if packed: from base64 import b64decode packed = packed.group(1).replace('"', '').replace('+', '') packed = b64decode(packed.encode('ascii')) html += '%s</script>' % packed.decode('latin-1').strip() source = helpers.scrape_sources(html) if source: headers.update({'Referer': web_url, 'Accept': '*/*'}) vsrv = re.findall(r'//(\d+)/', source[0][1])[0] source = re.sub(r"//\d+/", "//{0}/".format(host), source[0][1]) + '?s={0}&d='.format(vsrv) html = self.net.http_GET(source, headers=headers).content sources = re.findall(r'RESOLUTION=\d+x(\d+)\n([^\n]+)', html) return helpers.pick_source(helpers.sort_sources_list( sources)) + helpers.append_headers(headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): surl = 'https://abcvideo.cc/dl' domain = 'aHR0cHM6Ly9hYmN2aWRlby5jYzo0NDM.' web_url = self.get_url(host, media_id) rurl = 'https://{0}/'.format(host) headers = {'User-Agent': common.FF_USER_AGENT, 'Referer': rurl} html = self.net.http_GET(web_url, headers).content token = helpers.girc(html, rurl, domain) if token: data = { 'op': 'video_src', 'file_code': media_id, 'g-recaptcha-response': token } headers.update({'X-Requested-With': 'XMLHttpRequest'}) shtml = self.net.http_GET('{0}?{1}'.format( surl, urllib_parse.urlencode(data)), headers=headers).content sources = helpers.scrape_sources(shtml) if sources: headers.pop('X-Requested-With') return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('File Not Found or removed')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if html: try: pattern = r"""ajax\(url,opts\);}}\)\(([\d]+),[\d]+,\[([\d,]+)\]\);""" url_id, quals = re.findall(pattern, html)[0] quals = quals.replace(',', '+') headers.update({'Referer': web_url, 'Origin': host}) post_url = 'https://tkn.kodicdn.com/0000000%s/desktop/%s' % ( url_id, quals) html = self.net.http_POST(post_url, headers=headers, form_data='').content if html: sources = helpers.scrape_sources( html, patterns=[ """['"](?P<label>\d+)['"]:{[\w":,]+token['"]:['"](?P<url>[^'"]+)""" ]) if sources: return helpers.pick_source( sources) + helpers.append_headers(headers) except: raise ResolverError('File not found') raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = { 'User-Agent': common.FF_USER_AGENT, 'Referer': 'https://vidembed.io/' } key = '25746538592938496764662879833288'.encode('utf8') iv = self.f_random(16) encryptor = pyaes.Encrypter( pyaes.AESModeOfOperationCBC(key, iv.encode('utf8'))) eid = encryptor.feed(media_id) eid += encryptor.feed() url = 'https://vidembed.io' + '/encrypt-ajax.php?id=' + base64.b64encode(eid).decode('utf8') \ + '&refer=none&time=' + self.f_random(2) + iv + self.f_random(2) headers.update({'X-Requested-With': 'XMLHttpRequest'}) js_data = json.loads(self.net.http_GET(url, headers=headers).content) sources = js_data.get('source', None) if sources: sources = [(source.get('label'), source.get('file')) for source in sources] headers.pop('X-Requested-With') source = helpers.pick_source(helpers.sort_sources_list(sources)) return source + helpers.append_headers(headers) # Try Beta Server if no sources found with earlier method headers.pop('X-Requested-With') html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources(html) if sources: headers.update({'Origin': 'https://vidembed.io'}) return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.FF_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources(html) if sources: return helpers.pick_source(helpers.sort_sources_list(sources)) + helpers.append_headers(headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.FF_USER_AGENT, 'Referer': web_url} response = self.net.http_GET(web_url, headers=headers) html = response.content sources = helpers.scrape_sources(html) return helpers.pick_source(sources) + helpers.append_headers(headers)
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.FF_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources(html) if sources: headers.update({'verifypeer': 'false'}) return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError('Video cannot be located.')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'Cookie': 'ref_url=http%3A%2F%2Fwww.movieswatch.com.pk%2F', 'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources(html) if sources: headers.pop('Cookie') return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA, 'Referer': web_url} html = self.net.http_GET(web_url, headers=headers).content html = html.encode('utf-8') if helpers.PY2 else html aa_text = re.search(r"""(゚ω゚ノ\s*=\s*/`m´\s*)\s*ノ.+?;)\s*</script""", html, re.I) if aa_text: aa_decoded = aadecode.decode(aa_text.group(1)) sources = helpers.scrape_sources(aa_decoded) else: sources = helpers.scrape_sources(html, patterns=[r'''sources:\s*\[{src:\s*"(?P<url>[^"]+)''']) if sources: headers.update({'Referer': web_url}) return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): embeds = [ 'http://bestarticles.me/', 'http://tellygossips.net/', 'http://tvarticles.org/' ] web_url = self.get_url(host, media_id) headers = { 'User-Agent': common.FF_USER_AGENT, 'Referer': random.choice(embeds) } html = self.net.http_GET(web_url, headers=headers).content if 'Not Found' in html: raise ResolverError('File Removed') if 'Video is processing' in html: raise ResolverError('File still being processed') html += helpers.get_packed_data(html) packed = re.search(r"JuicyCodes\.Run\((.+?)\)", html, re.I) if packed: from base64 import b64decode packed = packed.group(1).replace('"', '').replace('+', '') packed = b64decode(packed.encode('ascii')) html += '%s</script>' % packed.decode('latin-1').strip() source = helpers.scrape_sources( html, patterns=[r'''"file":\s*"(?P<url>[^"]+\.(?:m3u8|mp4|txt))"''']) if source: headers.update({'Referer': web_url, 'Accept': '*/*'}) vsrv = re.search(r'//(\d+)/', source[0][1]) if vsrv: source = re.sub(r"//\d+/", "//{0}/".format(host), source[0][1]) + '?s={0}&d='.format( vsrv.group(1)) disk = re.findall(r'videoDisk":\s*"([^"]+)', html) if disk: disk = base64.b64encode( disk[0].encode('utf-8')).decode('utf-8') source += disk else: source = source[0][1] html = self.net.http_GET(source, headers=headers).content sources = re.findall(r'RESOLUTION=\d+x(\d+)\n([^\n]+)', html) src = helpers.pick_source(helpers.sort_sources_list(sources)) if not src.startswith('http'): src = re.sub(source.split('/')[-1], src, source) return src + helpers.append_headers(headers) raise ResolverError('Video not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content _srcs = re.search(r'sources\s*:\s*\[(.+?)\]', html) if _srcs: srcs = helpers.scrape_sources(_srcs.group(1), patterns=['''["'](?P<url>http[^"']+)''']) if srcs: headers.update({'Referer': web_url}) return helpers.pick_source(srcs) + helpers.append_headers(headers) raise ResolverError('Unable to locate link')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources( html, patterns=[r'''file:"(?P<url>[^"]+)",label:"(?P<label>[^"]+)'''], generic_patterns=False) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('Video cannot be located.')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content sources = helpers.scrape_sources(html, patterns=[r'file:\s*"(?P<url>[^"]+)'], generic_patterns=False, result_blacklist=['.m3u8']) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('File Not Found or removed')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.CHROME_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content html += helpers.get_packed_data(html) sources = helpers.scrape_sources(html) if sources: headers.update({'Referer': web_url}) return self._redirect_test( helpers.pick_source(sources)) + helpers.append_headers(headers) else: raise ResolverError("Video not found")
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = { 'User-Agent': common.RAND_UA, 'Referer': 'https://www1.putlockertv.se/' } html = self.net.http_GET(web_url, headers=headers).content if html: sources = helpers.scrape_sources(html) if sources: headers.update({'Referer': web_url}) return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError("Unable to locate video")
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA, 'Referer': web_url} html = self.net.http_GET(web_url, headers=headers).content r = re.search(r'JuicyCodes\.Run\("([^)]+)"\)', html) if r: jc = r.group(1).replace('"+"', '') jc = base64.b64decode(jc.encode('ascii')) jc = jsunpack.unpack(jc.decode('ascii')) sources = helpers.scrape_sources(jc) return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError('Video cannot be located.')
def get_media_url(self, host, media_id): if '|' in media_id: media_id, referer = media_id.split('|') else: referer = None web_url = self.get_url(host, media_id) referer = web_url if referer is None else referer headers = {'User-Agent': common.FF_USER_AGENT, 'Referer': referer} response = self.net.http_GET(web_url, headers=headers).content srcs = helpers.scrape_sources( response, patterns=[r'''file:\s*"(?P<url>[^"]+)''']) if srcs: headers.update({'Referer': web_url}) return helpers.pick_source(sorted( srcs, reverse=True)) + helpers.append_headers(headers) raise ResolverError('No playable video found.')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.CHROME_USER_AGENT} html = self.net.http_GET(web_url, headers=headers).content if '<b>File not found, sorry!</b>' not in html: html += helpers.get_packed_data(html) sources = helpers.scrape_sources(html) if sources: headers.update({'Referer': web_url}) vurl = helpers.pick_source(sources) vurl = re.sub('get[0-9a-zA-Z]{4,5}-', 'getlink-', vurl) return helpers.get_redirect_url(vurl, headers) + helpers.append_headers(headers) raise ResolverError('Video not found or removed')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA, 'Referer': web_url} html = self.net.http_GET(web_url, headers=headers).content r = re.search(r"[>;]var\s*hxstring\s*=\s*'([^']+)", html) if r: b = "\x6b\x36\x73\x79\x7a\x6a\x61\x6a\x34\x6a\x7a\x61\x37\x32\x66\x31\x31\x33\x33\x30\x68\x6c\x76\x6e\x66\x6c\x6e\x62\x33\x68\x37\x79\x74\x68\x7a\x7a\x71\x66\x39\x6d\x37\x30\x6c\x79\x39\x7a\x7a\x76\x63\x33" html = base64.b64decode(r.group(1).encode('ascii')) html = self.hx_decrypt(b, html.decode('latin-1')) sources = helpers.scrape_sources(html) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('Video cannot be located.')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if html: video_id = re.search("""playvideo\.php\?id=(\d+)""", html) if video_id: video_url = 'http://%s/jwplayer/playvideo.php?id=%s' % (host, video_id.group(1)) headers.update({'Referer': web_url}) _html = self.net.http_GET(video_url, headers=headers).content if _html: try: _html = jsunpack.unpack(_html) except Exception as e: raise ResolverError(e) sources = helpers.scrape_sources(_html, patterns=['''file:\s*["'](?P<url>http[^"']+)''']) if sources: return helpers.pick_source(sources) + helpers.append_headers(headers) raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if 'p,a,c,k,e' in html: html = helpers.get_packed_data(html) _srcs = re.search(r'sources\s*:\s*\[(.+?)\]', html) if _srcs: sources = helpers.scrape_sources( _srcs.group(1), patterns=['''["'](?P<url>http[^"']+)'''], result_blacklist=['.m3u8']) if sources: headers.update({'Referer': web_url}) return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if html: try: pattern = r"""ajax\(url,opts\);}}\)\(([\d]+),[\d]+,\[([\d,]+)\]\);""" url_id, quals = re.findall(pattern, html)[0] quals = quals.replace(',','+') headers.update({'Referer': web_url, 'Origin': host}) post_url = 'https://tkn.kodicdn.com/0000000%s/desktop/%s' % (url_id, quals) html = self.net.http_POST(post_url, headers=headers, form_data='').content if html: sources = helpers.scrape_sources(html, patterns=["""['"](?P<label>\d+)['"]:{[\w":,]+token['"]:['"](?P<url>[^'"]+)"""]) if sources: return helpers.pick_source(sources) + helpers.append_headers(headers) except: raise ResolverError('File not found') raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content r = re.search(r'uttf0\((\[[^)]+)', html) if r: r = eval(r.group(1)) r = base64.b64decode( ''.join(r)[::-1].encode('utf8')).decode('utf8') return r + helpers.append_headers(headers) sources = helpers.scrape_sources( html, patterns=[ r'''hls":\s*"(?P<url>[^"]+)",\s*"video_height":\s*(?P<label>[^,]+)''' ], generic_patterns=False) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('No video found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) headers = {'User-Agent': common.RAND_UA} html = self.net.http_GET(web_url, headers=headers).content if html: try: params = "".join([x.replace("' + '", "") for x in self.between(html, "params += '", "';")]) vkey = params.split('=')[-1] m = hashlib.md5() m.update(vkey + 'PT6l13umqV8K827') params += '&pkey=%s' % m.hexdigest() params = urllib.unquote(params) url = 'http://www.drtuber.com/player_config/?' + params sources_html = self.net.http_GET(url, headers=headers).content if sources_html: sources = helpers.scrape_sources(sources_html, patterns=["""video_file>\<\!\[CDATA\[(?P<url>[^\]]+)"""]) if sources: return helpers.pick_source(sources) + helpers.append_headers(headers) except: raise ResolverError('File not found') raise ResolverError('File not found')
def get_media_url(self, host, media_id): web_url = self.get_url(host, media_id) rurl = 'https://{0}/'.format(host) headers = { 'User-Agent': common.FF_USER_AGENT, 'Origin': rurl[:-1], 'Referer': rurl } data = { 'op': 'download1', 'usr_login': '', 'id': media_id, 'referer': rurl, 'method_free': 'Free Download' } html = self.net.http_POST(web_url, form_data=data, headers=headers).content sources = helpers.scrape_sources(html) if sources: return helpers.pick_source(sources) + helpers.append_headers( headers) raise ResolverError('File Not Found or removed')