def finder4(html, url): ref = url try: try: link = re.compile('file\s*:\s*"(.+?)"').findall(html)[0] except: link = re.compile("file\s*:\s*'(.+?)'").findall(html)[0] if '.png' in link or link == '.flv': return if '.f4m' in link: link = link + '?referer=%s' % url if '.m3u8' in link and '|' not in link: link += '|%s' % urllib.urlencode( { 'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(link).netloc, 'Connection': 'keep-alive', 'Accept': '*/*' }) return link except: return
def finder123(html, ref): try: url = re.findall('mpegurl.+?src=[\"\']([^\"\']+)[\"\']', html)[0] return url + '|%s' % urllib.urlencode( { 'Referer': ref, 'X-Requested-With': constants.get_shockwave(), 'User-agent': client.agent() }) except: return
def finder1(html,url): html = html.replace('/adplus/adplus.html?id=','') try:html = urllib.unquote(html) except:pass global limit limit+=1 ref=url try: urls = re.findall('<i?frame\s*.+?src=(?:\'|\")(.+?)(?:\'|\")',html,flags=re.IGNORECASE) urly = client.parseDOM(html, "iframe", ret="src") urlc = re.findall('top.location.href\s*=\s*[\'\"](.+?axe-tv[^\'\"]+)[\'\"]',html) for url in urlc: if 'sky-sports-1' not in url and 'fox1ushd' not in url: urls.append(url) urls += urly try: urls.append(re.findall("playStream\('iframe', '(.+?)'\)",html)[0]) except: pass urls += re.findall('<a.+?href=[\'\"](/live-.+?stream.+?)[\'\"]',html) urls += re.findall('(http://www.hdmyt.info/(?:channel|player).php\?file=[^"\']+)["\']',html) from random import shuffle for url in urls: url = url.replace('https','http') if 'c4.zedo' in url or 'ProtectFile.File' in url or 'adServe' in url or 'facebook' in url or 'banner' in url: continue elif "micast" in url or 'turbocast' in url: return finder47(html,ref) elif 'lshstream' in url: return finder2(url,url) rr = resolve_it(url) if rr: return rr uri = manual_fix(url,ref) if limit>=25: log("Exiting - iframe visit limit reached") return resolved = find_link(uri) if resolved: break headers = {'User-Agent': client.agent(), 'Referer': ref} if '.m3u8' in resolved and '|' not in resolved: headers.update({'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(resolved).netloc, 'Connection':'keep-alive'}) resolved += '|%s' % urllib.urlencode(headers) return resolved except: return
def finder79(html, url): try: ref = url url = re.findall("playStream\('hls', '(.+?)'", html)[0] url += '|%s' % urllib.urlencode( { 'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(url).netloc, 'Connection': 'keep-alive', 'Accept': '*/*' }) return url except: return
def finder75(html, url): try: ref = url url = re.findall('file: window.atob\(\'(.+?)\'\),', html)[0] file = base64.b64decode(url) file += '|%s' % urllib.urlencode( { 'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(file).netloc, 'Connection': 'keep-alive', 'Accept': '*/*' }) return file except: return
def finder1(html, url): global limit limit += 1 ref = url try: urls = re.findall('<i?frame.+?src=(?:\'|\")(.+?)(?:\'|\")', html) try: urls.append(re.findall("playStream\('iframe', '(.+?)'\)", html)[0]) except: pass urls += re.findall('<a.+?href=[\'\"](/live-.+?stream.+?)[\'\"]', html) urls += re.findall( 'src=["\'](http://www.hdmyt.info/channel.php\?file=[^"\']+)["\']', html) from random import shuffle for url in urls: if 'c4.zedo' in url or 'ProtectFile.File' in url or 'adServe' in url or 'facebook' in url or 'banner' in url: continue if "micast" in url or 'turbocast' in url: return finder47(html, ref) rr = resolve_it(url) if rr: return rr uri = manual_fix(url, ref) if limit >= 25: log("Exiting - iframe visit limit reached") return resolved = find_link(uri) if resolved: break headers = {'User-Agent': client.agent(), 'Referer': ref} if '.m3u8' in resolved and '|' not in resolved: headers.update({ 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(resolved).netloc, 'Connection': 'keep-alive' }) resolved += '|%s' % urllib.urlencode(headers) return resolved except: return
def finder117(html, ref): if 'zunox' in ref: url = 'http://zunox.hk/players/' + re.findall( '(proxy.php\?id=[^\"\']+)', html)[0] h2 = client.request(url) import json j = json.loads(h2) host = urlparse.urlparse(j['url']).netloc.split(':')[0].replace( ':80', '') url = j['url'].replace(':80', '') + '.flv' + '|%s' % urllib.urlencode( { 'User-agent': client.agent(), 'X-Requested-With': constants.get_shockwave(), 'Referer': ref, 'Host': host, 'Connection': 'keep-alive', 'Accept-Encodeing': 'gzip, deflate, lzma, sdch' }) return url
def finder92(html, ref): try: url = re.findall('src=[\"\']([^\"\']+)[\"\'].+?mpeg', html)[0] if 'rtmp' in url: url += ' swfUrl=http://www.shadow-net.biz/javascript/videojs/flashls/video-js.swf flashver=%s live=true timeout=18 swfVfy=1 pageUrl=http://www.shadow-net.biz/' % FLASH elif 'm3u8' in url: url += '|%s' % urllib.urlencode( { 'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(url).netloc, 'Connection': 'keep-alive', 'Accept': '*/*', 'Origin': 'http://shadow.go.ro' }) return url except: return
def finder1(html,url): global limit limit+=1 ref=url try: urls = re.findall('<i?frame.+?src=(?:\'|\")(.+?)(?:\'|\")',html,flags=re.IGNORECASE) try: urls.append(re.findall("playStream\('iframe', '(.+?)'\)",html)[0]) except: pass urls += re.findall('<a.+?href=[\'\"](/live-.+?stream.+?)[\'\"]',html) urls += re.findall('(http://www.hdmyt.info/(?:channel|player).php\?file=[^"\']+)["\']',html) from random import shuffle for url in urls: if 'c4.zedo' in url or 'ProtectFile.File' in url or 'adServe' in url or 'facebook' in url or 'banner' in url: continue if "micast" in url or 'turbocast' in url: return finder47(html,ref) rr = resolve_it(url) if rr: return rr uri = manual_fix(url,ref) if limit>=25: log("Exiting - iframe visit limit reached") return resolved = find_link(uri) if resolved: break headers = {'User-Agent': client.agent(), 'Referer': ref} if '.m3u8' in resolved and '|' not in resolved: headers.update({'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(resolved).netloc, 'Connection':'keep-alive'}) resolved += '|%s' % urllib.urlencode(headers) return resolved except: return
def finder1(html, url): html = html.replace('/adplus/adplus.html?id=', '') try: html = urllib.unquote(html) except: pass global limit limit += 1 ref = url try: urls = re.findall('<i?frame\s*.+?src=(?:\'|\")(.+?)(?:\'|\")', html, flags=re.IGNORECASE) urly = client.parseDOM(html, "iframe", ret="src") urlc = re.findall( 'top.location.href\s*=\s*[\'\"](.+?axe-tv[^\'\"]+)[\'\"]', html) for url in urlc: if 'sky-sports-1' not in url and 'fox1ushd' not in url: urls.append(url) urls += urly try: urls.append(re.findall("playStream\('iframe', '(.+?)'\)", html)[0]) except: pass urls += re.findall('<a.+?href=[\'\"](/live-.+?stream.+?)[\'\"]', html) urls += re.findall( '(http://www.hdmyt.info/(?:channel|player).php\?file=[^"\']+)["\']', html) from random import shuffle for url in urls: url = url.replace('https', 'http') if 'c4.zedo' in url or 'ProtectFile.File' in url or 'adServe' in url or 'facebook' in url or 'banner' in url: continue elif "micast" in url or 'turbocast' in url: return finder47(html, ref) elif 'lshstream' in url: return finder2(url, url) rr = resolve_it(url) if rr: return rr uri = manual_fix(url, ref) if limit >= 25: log("Exiting - iframe visit limit reached") return resolved = find_link(uri) if resolved: break headers = {'User-Agent': client.agent(), 'Referer': ref} if '.m3u8' in resolved and '|' not in resolved: headers.update({ 'X-Requested-With': constants.get_shockwave(), 'Host': urlparse.urlparse(resolved).netloc, 'Connection': 'keep-alive' }) resolved += '|%s' % urllib.urlencode(headers) return resolved except: return
def finder79(html,url): try: ref = url url = re.findall("playStream\('hls', '(.+?)'",html)[0] url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(url).netloc, 'Connection':'keep-alive','Accept':'*/*'}) return url except: return
def finder75(html,url): try: ref = url url = re.findall('file: window.atob\(\'(.+?)\'\),', html)[0] file = base64.b64decode(url) file += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(file).netloc, 'Connection':'keep-alive','Accept':'*/*'}) return file except: return
def finder4(html,url): ref = url try: try: link = re.compile('file\s*:\s*"(.+?)"').findall(html)[0] except: link = re.compile("file\s*:\s*'(.+?)'").findall(html)[0] if '.png' in link or link == '.flv': return if '.f4m' in link: link = link+'?referer=%s'%url if '.m3u8' in link and '|' not in link: link += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(link).netloc, 'Connection':'keep-alive','Accept':'*/*'}) return link except: return
def finder117(html,ref): if 'zunox' in ref: url = 'http://zunox.hk/players/' + re.findall('(proxy.php\?id=[^\"\']+)',html)[0] h2 = client.request(url) import json j = json.loads(h2) host = urlparse.urlparse(j['url']).netloc.split(':')[0].replace(':80','') url = j['url'].replace(':80','') +'.flv' + '|%s' % urllib.urlencode({'User-agent':client.agent(),'X-Requested-With':constants.get_shockwave(),'Referer':ref, 'Host':host, 'Connection':'keep-alive','Accept-Encodeing':'gzip, deflate, lzma, sdch'}) return url
def finder92(html,ref): try: url = re.findall('src=[\"\']([^\"\']+)[\"\'].+?mpeg',html)[0] if 'rtmp' in url: url+=' swfUrl=http://www.shadow-net.biz/javascript/videojs/flashls/video-js.swf flashver=%s live=true timeout=18 swfVfy=1 pageUrl=http://www.shadow-net.biz/'%FLASH elif 'm3u8' in url: url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': ref, 'X-Requested-With':constants.get_shockwave(), 'Host':urlparse.urlparse(url).netloc, 'Connection':'keep-alive','Accept':'*/*', 'Origin':'http://shadow.go.ro'}) return url except: return
def finder123(html,ref): try: url = re.findall('mpegurl.+?src=[\"\']([^\"\']+)[\"\']',html)[0] return url + '|%s' % urllib.urlencode({'Referer':ref,'X-Requested-With':constants.get_shockwave(),'User-agent':client.agent()}) except: return