Beispiel #1
0
def resolve(url):
    try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        page = 'http://p2pcast.tv/stream.php?id=%s&live=0&p2p=0&stretching=uniform' % page

        result = client.request(page, referer=referer)

        js = re.compile('src\s*=\s*[\'|\"](.+?player.+?\.js)[\'|\"]').findall(result)[-1]
        js = client.request(js)

        try:
            token = re.findall('[\'|\"](.+?\.php)[\'|\"]',js)[-1]
            token = urlparse.urljoin('http://p2pcast.tv', token)
            token = client.request(token, referer=page, headers={'User-Agent': client.agent(), 'X-Requested-With': 'XMLHttpRequest'})
            token = re.compile('[\'|\"]token[\'|\"]\s*:\s*[\'|\"](.+?)[\'|\"]').findall(token)[0]
        except:
            token = ''


        try:
            swf = re.compile('flashplayer\s*:\s*[\'|\"](.+?)[\'|\"]').findall(js)[-1]
        except:
            swf = 'http://cdn.p2pcast.tv/jwplayer.flash.swf'


        url = re.compile('url\s*=\s*[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = base64.b64decode(url) + token
        url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': swf})

        return url
    except:
        return
Beispiel #2
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://letwatch.us/embed-%s.html' % url

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: unpacked += i
        result = re.sub('\s\s+', ' ', unpacked)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](http.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #3
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/video/', '/embed/')

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: pass
        result += unpacked
        result = re.sub('\s\s+', ' ', result)

        var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)
        for i in range(100):
            for v in var: result = result.replace("' %s '" % v[0], v[1]).replace("'%s'" % v[0], v[1])

        url = re.compile('sources\s*:\s*\[.+?file\s*:\s*(.+?)\s*\,').findall(result)[0]
        var = re.compile('var\s+%s\s*=\s*\'(.+?)\'' % url).findall(result)
        if len(var) > 0: url = var[0].strip()
        url += headers

        if url.startswith('http'): return url 
    except:
        return
Beispiel #4
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'form', attrs={'name': 'F1'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs={'type': 'hidden'})
        for i in k:
            post.update({
                i:
                client.parseDOM(f, 'input', ret='value', attrs={'name': i})[0]
            })
        post = urllib.urlencode(post)

        for i in range(0, 3):
            try:
                result = client.request(url, post=post)
                url = client.parseDOM(result, 'div', attrs={'align': '.+?'})
                url = [i for i in url if 'button_upload' in i][0]
                url = client.parseDOM(url, 'a', ret='href')[0]
                url = [
                    'http' + i for i in url.split('http') if 'uptobox.com' in i
                ][0]
                return url + headers
            except:
                time.sleep(1)
    except:
        return
Beispiel #5
0
def resolve(url):
    try:
        if check(url) == False: return

        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        id = re.compile('//.+?/(?:embed|f)/([0-9a-zA-Z-_]+)').findall(url)[0]

        url = 'https://api.openload.co/1/file/dlticket?file=%s' % id

        result = client.request(url)
        result = json.loads(result)

        cap = result['result']['captcha_url']

        if not cap == None: cap = captcha.keyboard(cap)

        time.sleep(result['result']['wait_time'])

        url = 'https://api.openload.co/1/file/dl?file=%s&ticket=%s' % (id, result['result']['ticket'])

        if not cap == None:
            url += '&captcha_response=%s' % urllib.quote(cap)

        result = client.request(url)
        result = json.loads(result)

        url = result['result']['url'] + '?mime=true'
        url += headers

        return url
    except:
        return
Beispiel #6
0
def resolve(url):
    try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        page = 'http://p2pcast.tv/stream.php?id=%s&live=0&p2p=0&stretching=uniform' % page

        result = client.request(page, referer=referer)

        token = client.request('http://p2pcast.tv/getToken.php', referer=page, headers={'User-Agent': client.agent(), 'X-Requested-With': 'XMLHttpRequest'})
        try: token = re.compile('[\'|\"]token[\'|\"]\s*:\s*[\'|\"](.+?)[\'|\"]').findall(token)[0]
        except: token = ''

        try:
            swf = re.compile('src\s*=[\'|\"](.+?player.+?\.js)[\'|\"]').findall(result)[0]
            swf = client.request(swf)
            swf = re.compile('flashplayer\s*:\s*[\'|\"](.+?)[\'|\"]').findall(swf)[0]
        except:
            swf = 'http://cdn.p2pcast.tv/jwplayer.flash.swf'


        url = re.compile('url\s*=\s*[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = base64.b64decode(url) + token
        url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': swf})

        return url
    except:
        return
Beispiel #7
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://speedvideo.net/embed-%s.html' % url

        result = client.request(url)

        a = re.compile('var\s+linkfile *= *"(.+?)"').findall(result)[0]
        b = re.compile('var\s+linkfile *= *base64_decode\(.+?\s+(.+?)\)'
                       ).findall(result)[0]
        c = re.compile('var\s+%s *= *(\d*)' % b).findall(result)[0]

        url = a[:int(c)] + a[(int(c) + 10):]
        url = base64.urlsafe_b64decode(url)
        url += headers

        return url
    except:
        return
Beispiel #8
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://www.movdivx.com/%s' % url
 
        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'Form', attrs = {'action': '' })[0]
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post.update({'method_free': 'Free Download'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #9
0
def resolve(url):
    try:
        headers = "|%s" % urllib.urlencode({"User-Agent": client.agent(), "Referer": url})

        url = url.replace("/embed-", "/")
        url = re.compile("//.+?/([\w]+)").findall(url)[0]
        url = "http://vid.ag/embed-%s.html" % url

        result = client.request(url, mobile=True)

        result = re.compile("(eval.*?\)\)\))").findall(result)[-1]
        result = jsunpack.unpack(result)

        result = re.compile("sources *: *\[.+?\]").findall(result)[-1]
        result = re.compile('file *: *"(http.+?)"').findall(result)

        url = [i for i in result if ".m3u8" in i]
        if len(url) > 0:
            return url[0] + headers

        url = [i for i in result if not ".m3u8" in i]
        if len(url) > 0:
            return url[0] + headers
    except:
        return
Beispiel #10
0
	def __init__(self):
		del loggertxt[:]
		self.ver = '0.0.2'
		self.update_date = 'Feb. 22, 2019'
		log(type='INFO', method='init', err=' -- Initializing %s %s %s Start --' % (name, self.ver, self.update_date))
		self.init = False
		self.base_link_alts = ['http://www.documentaryarea.tv']
		self.base_link = self.base_link_alts[0]
		self.MainPageValidatingContent = 'Documentary Area - Simply the best Documentaries'
		self.type_filter = ['movie', 'show', 'anime']
		self.name = name
		self.disabled = False
		self.loggertxt = []
		self.ssl = False
		self.logo = 'https://i.imgur.com/lRlaUzo.png'
		self.search_link = '/results.php?pageNum_Recordset1=%s&search=%s&genre='
		self.user_agent = client.agent()
		self.speedtest = 0
		if len(proxies.sourceProxies)==0:
			proxies.init()
		self.proxyrequired = False
		self.msg = ''
		self.siteonline = self.testSite()
		self.testparser = 'Unknown'
		self.testparser = self.testParser()
		self.firstRunDisabled = False
		self.init = True
		log(type='INFO', method='init', err=' -- Initializing %s %s %s End --' % (name, self.ver, self.update_date))
Beispiel #11
0
def getAllQuals(url, online=None):
	try:
		if online == None:
			if check(url) == False: 
				raise Exception('Video not available')
			
		page_data_string = client.request(url, httpsskip=True)
		video_urls, err = decode(page_data_string)
		
		if video_urls == None:
			raise Exception(err)
		
		video_url_a = []
		myheaders = {}
		myheaders['User-Agent'] = client.agent()
		myheaders['Referer'] = url
		
		for v in video_urls:
			try:
				fs = client.getFileSize(v, retry429=True)
				qs = qual_based_on_fs(fs)
				f_i = {'label': '%s' % qs, 'file':v, 'fs':fs, 'page':url}
				video_url_a.append(f_i)
			except:
				pass
		
		video_urlf = video_url_a
		return (video_urlf, '', None)
	except Exception as e:
		e = '{}'.format(e)
		return (None, e, None)
Beispiel #12
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://grifthost.com/embed-%s.html' % url

        result = client.request(url)

        try:
            post = {}
            f = client.parseDOM(result, 'Form', attrs = {'method': 'POST'})[0]
            f = f.replace('"submit"', '"hidden"')
            k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
            for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
            post = urllib.urlencode(post)
            result = client.request(url, post=post)
        except:
            pass

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #13
0
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None: return sources

            content = re.compile('(.+?)\?S\d*E\d*$').findall(url)

            try: url, season, episode = re.compile('(.+?)\?S(\d*)E(\d*)$').findall(url)[0]
            except: pass

            url = urlparse.urljoin(self.base_link, url)

            result = client.source(url)

            if len(content) == 0:
                u = client.parseDOM(result, 'source', ret='src', attrs = {'type': 'video.+?'})[0]
            else:
                u = re.compile('playSeries\((\d+),(%01d),(%01d)\)' % (int(season), int(episode))).findall(result)[0]
                u = self.episode_link % (u[0], u[1], u[2])
                u = urlparse.urljoin(self.base_link, u)
                u = client.source(u)
                u = json.loads(u)['url']

            url = '%s|User-Agent=%s&Referer=%s' % (u, urllib.quote_plus(client.agent()), urllib.quote_plus(url))

            sources.append({'source': 'MovieTV', 'quality': 'HD', 'provider': 'MovieTV', 'url': url})

            return sources
        except:
            return sources
Beispiel #14
0
def resolve(url):
    try:
        url = url.split('/preview', 1)[0]
        url = url.replace('drive.google.com', 'docs.google.com')

        result = client.request(url, headers={'User-Agent': client.agent()})

        result = re.compile('"fmt_stream_map",(".+?")').findall(result)[0]

        u = json.loads(result)
        u = [i.split('|')[-1] for i in u.split(',')]
        u = sum([tag(i) for i in u], [])

        url = []
        try: url += [[i for i in u if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in u if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
Beispiel #15
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://allvid.ch/embed-%s.html' % url

        result = client.request(url)

        r = re.compile('file\s*:\s*"(.+?)".+?label\s*:\s*"(\d+)"').findall(result)

        if len(r) == 0:
            r = re.compile('(eval.*?\)\)\))').findall(result)[-1]
            r = jsunpack.unpack(r)
            r = re.compile('file\s*:\s*"(.+?)".+?label\s*:\s*"(\d+)"').findall(r)

        url = []
        try: url.append({'quality': '1080p', 'url': [i[0] + headers for i in r if int(i[1]) >= 1080][0]})
        except: pass
        try: url.append({'quality': 'HD', 'url': [i[0] + headers for i in r if 720 <= int(i[1]) < 1080][0]})
        except: pass
        try: url.append({'quality': 'SD', 'url': [i[0] + headers for i in r if int(i[1]) < 720][0]})
        except: pass

        return url
    except:
        return
Beispiel #16
0
def resolve(url):
    try:
        result = client.source(url, headers={'User-Agent': client.agent()})

        id = (urlparse.urlparse(url).path).split('/')[-1]
        result = result.replace('\r','').replace('\n','').replace('\t','')
        result = result.split('"%s"' % id)[-1].split(']]')[0]

        result = result.replace('\\u003d','=').replace('\\u0026','&')
        result = re.compile('url=(.+?)&').findall(result)
        result = [urllib.unquote(i) for i in result]

        result = [tag(i)[0] for i in result]

        url = []
        try: url += [[i for i in result if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
Beispiel #17
0
def resolve(url):
    try:
        id = re.compile('#(\d*)').findall(url)[0]

        result = client.request(url, headers={'User-Agent': client.agent()})

        result = re.search('feedPreload:\s*(.*}]}})},', result, re.DOTALL).group(1)
        result = json.loads(result)['feed']['entry']

        if len(result) > 1: result = [i for i in result if str(id) in i['link'][0]['href']][0]
        elif len(result) == 1: result = result[0]

        result = result['media']['content']
        result = [i['url'] for i in result if 'video' in i['type']]
        result = sum([tag(i) for i in result], [])

        url = []
        try: url += [[i for i in result if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
Beispiel #18
0
def T3DonlineFilms(url):
    error = ''
    try:
        data = urlparse.parse_qs(url)
        headers = {}
        headers['Referer'] = 'http://3donlinefilms.com'
        b = data['page'][0]
        cook = client.request(b, output='cookie')

        l0 = 'http://3donlinefilms.com/update.php'
        post_data = {'file': data['src_file'][0]}

        cookie = '%s; zeroday=; visit=yes; jwplayer.qualityLabel=HD' % cook
        headers['Referer'] = data['page'][0]
        headers['User-Agent'] = client.agent()
        headers['Cookie'] = cookie

        try:
            ret = client.request(l0,
                                 post=client.encodePostData(post_data),
                                 output='extended',
                                 XHR=True,
                                 cookie=cookie)
        except:
            pass

        u = '%s?file=%s' % (data['file'][0], data['src_file'][0].replace(
            ' ', ''))

        paramsx = {'headers': headers}
        params = client.b64encode(json.dumps(paramsx, encoding='utf-8'))
    except Exception as e:
        error = '%s' % e
    return u, params, error
Beispiel #19
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://letwatch.us/embed-%s.html' % url

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                unpacked += i
        result = re.sub('\s\s+', ' ', unpacked)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](http.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #20
0
def resolve(url):
    try:
        url = url.split('/preview', 1)[0]
        url = url.replace('drive.google.com', 'docs.google.com')

        result = client.request(url, headers={'User-Agent': client.agent()})

        result = re.compile('"fmt_stream_map",(".+?")').findall(result)[0]

        u = json.loads(result)
        u = [i.split('|')[-1] for i in u.split(',')]
        u = sum([tag(i) for i in u], [])

        url = []
        try:
            url += [[i for i in u if i['quality'] == '1080p'][0]]
        except:
            pass
        try:
            url += [[i for i in u if i['quality'] == 'HD'][0]]
        except:
            pass
        try:
            url += [[i for i in u if i['quality'] == 'SD'][0]]
        except:
            pass

        if url == []: return
        return url
    except:
        return
Beispiel #21
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'form', attrs={'method': 'post'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs={'type': 'hidden'})
        for i in k:
            post.update({
                i:
                client.parseDOM(f, 'input', ret='value', attrs={'name': i})[0]
            })
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = client.parseDOM(result,
                              'a',
                              ret='href',
                              attrs={'class': 'view_dl_link'})[0]
        url = client.request(url, output='geturl', post=post)
        url += headers

        return url
    except:
        return
Beispiel #22
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://streamcloud.eu/%s' % url

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'form', attrs={'class': 'proform'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs={'type': 'hidden'})
        for i in k:
            post.update({
                i:
                client.parseDOM(f, 'input', ret='value', attrs={'name': i})[0]
            })
        post = urllib.urlencode(post)
        post = post.replace('op=download1', 'op=download2')

        result = client.request(url, post=post)

        url = re.compile('file *: *"(http.+?)"').findall(result)[-1]
        url += headers

        return url
    except:
        return
Beispiel #23
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        result = client.request(url, close=False)
        result = result.replace('\n','')

        url = re.compile('function\s*load_download.+?src\s*:\s*"(.+?)"').findall(result)[0]
        url = urlparse.urljoin('http://veehd.com', url)

        result = client.request(url, close=False)

        i = client.parseDOM(result, 'iframe', ret='src')
        if len(i) > 0:
            i = urlparse.urljoin('http://veehd.com', i[0])
            client.request(i, close=False)
            result = client.request(url)

        url = re.compile('href *= *"([^"]+(?:mkv|mp4|avi))"').findall(result)
        url += re.compile('src *= *"([^"]+(?:divx|avi))"').findall(result)
        url += re.compile('"url" *: *"(.+?)"').findall(result)
        url = urllib.unquote(url[0])
        url += headers

        return url
    except:
        return
Beispiel #24
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = url.replace('/vid/', '/')

        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://movpod.in/embed-%s.html' % url

        result = client.request(url)
        url = re.compile('file *: *"(http.+?)"').findall(result)[-1]

        request = urllib2.Request(url)
        response = urllib2.urlopen(request, timeout=30)
        response.close()

        type = str(response.info()["Content-Type"])

        if type == 'text/html': raise Exception()

        url += headers
        return url
    except:
        return
Beispiel #25
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://vid.ag/embed-%s.html' % url

        result = client.request(url, mobile=True)

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        result = re.compile('sources *: *\[.+?\]').findall(result)[-1]
        result = re.compile('file *: *"(http.+?)"').findall(result)

        url = [i for i in result if '.m3u8' in i]
        if len(url) > 0: return url[0] + headers

        url = [i for i in result if not '.m3u8' in i]
        if len(url) > 0: return url[0] + headers
    except:
        return
Beispiel #26
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        video = url.replace('/embed-', '/')
        video = re.compile('//.+?/([\w]+)').findall(video)[0]

        url = 'http://exashare.com/embed-%s.html' % video

        result = client.request(url)

        netloc = client.parseDOM(result, 'iframe', ret='src')[0]
        netloc = urlparse.urlparse(netloc).netloc

        url = 'http://%s/embed-%s.html' % (netloc, video)

        result = client.request(url)

        url = re.compile('file *: *"(http.+?)"').findall(result)[-1]
        url += headers
        return url
    except:
        return
Beispiel #27
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = urlparse.urlparse(url).query
        url = urlparse.parse_qsl(url)[0][1]
        url = 'http://videomega.tv/cdn.php?ref=%s' % url

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: unpacked += i
        result = unpacked
        result = re.sub('\s\s+', ' ', result)

        url = re.compile('"video".+?"src"\s*\,\s*"(.+?)"').findall(result)
        url += client.parseDOM(result, 'source', ret='src', attrs = {'type': 'video.+?'})
        url = url[0] + headers

        return url
    except:
        return
Beispiel #28
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://180upload.com/embed-%s.html' % url

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'form', attrs = {'id': 'captchaForm'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("'file' *, *'(.+?)'").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
 def __init__(self):
     del loggertxt[:]
     self.ver = '0.0.1'
     self.update_date = 'June 01, 2018'
     log(type='INFO',
         method='init',
         err=' -- Initializing %s %s %s Start --' %
         (name, self.ver, self.update_date))
     self.init = False
     self.base_link_alts = ['http://3donlinefilms.com']
     self.base_link = self.base_link_alts[0]
     self.MainPageValidatingContent = '3D online Films: Watch 3D Movies on Virtual Reality Glasses or TV'
     self.type_filter = ['movie', 'show', 'anime']
     self.name = name
     self.disabled = False
     self.loggertxt = []
     self.ssl = False
     self.logo = 'https://i.imgur.com/fFgGR3N.png'
     self.search_link = '/results.php?pageNum_Recordset1=%s&search=%s&genre='
     self.user_agent = client.agent()
     self.speedtest = 0
     if len(proxies.sourceProxies) == 0:
         proxies.init()
     self.proxyrequired = False
     self.msg = ''
     self.siteonline = self.testSite()
     self.testparser = 'Unknown'
     self.testparser = self.testParser()
     self.firstRunDisabled = False
     self.init = True
     log(type='INFO',
         method='init',
         err=' -- Initializing %s %s %s End --' %
         (name, self.ver, self.update_date))
Beispiel #30
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = client.request(url, close=False)
        result = result.replace('\n', '')

        url = re.compile(
            'function\s*load_download.+?src\s*:\s*"(.+?)"').findall(result)[0]
        url = urlparse.urljoin('http://veehd.com', url)

        result = client.request(url, close=False)

        i = client.parseDOM(result, 'iframe', ret='src')
        if len(i) > 0:
            i = urlparse.urljoin('http://veehd.com', i[0])
            client.request(i, close=False)
            result = client.request(url)

        url = re.compile('href *= *"([^"]+(?:mkv|mp4|avi))"').findall(result)
        url += re.compile('src *= *"([^"]+(?:divx|avi))"').findall(result)
        url += re.compile('"url" *: *"(.+?)"').findall(result)
        url = urllib.unquote(url[0])
        url += headers

        return url
    except:
        return
Beispiel #31
0
def resolve(url):
    try:
        result = client.source(url, headers={'User-Agent': client.agent()})

        id = (urlparse.urlparse(url).path).split('/')[-1]
        result = result.replace('\r','').replace('\n','').replace('\t','')
        result = result.split('"%s"' % id)[-1].split(']]')[0]

        result = result.replace('\\u003d','=').replace('\\u0026','&')
        result = re.compile('url=(.+?)&').findall(result)
        result = [urllib.unquote(i) for i in result]

        result = [tag(i)[0] for i in result]

        url = []
        try: url += [[i for i in result if i['quality'] == '1080p'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'HD'][0]]
        except: pass
        try: url += [[i for i in result if i['quality'] == 'SD'][0]]
        except: pass

        if url == []: return
        return url
    except:
        return
Beispiel #32
0
    def resolve(self, url):
        try:
            idx = int(re.compile('/(\d+)').findall(url)[-1])

            result = client.request(url)

            url = client.parseDOM(result, 'item')[idx]
            url = re.compile("file *= *[\'|\"](.+?)[\'|\"]").findall(url)
            url = [i for i in url if not i.endswith('.srt')][0]
            url = client.replaceHTMLCodes(url)
            url = url.encode('utf-8')

            if 'google' in url:
                url = client.request(url, output='geturl')
                if 'requiressl=yes' in url:
                    url = url.replace('http://', 'https://')
                else:
                    url = url.replace('https://', 'http://')

            else:
                url = '%s|User-Agent=%s' % (url,
                                            urllib.quote_plus(client.agent()))

            return url
        except:
            return
Beispiel #33
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        id = re.compile('//.+?/.+?/([\w]+)').findall(url)
        id += re.compile('//.+?/.+?v=([\w]+)').findall(url)
        id = id[0]

        url = 'http://embed.nowvideo.sx/embed.php?v=%s' % id

        result = client.request(url)

        key = re.compile('flashvars.filekey=(.+?);').findall(result)[-1]
        try: key = re.compile('\s+%s="(.+?)"' % key).findall(result)[-1]
        except: pass

        url = 'http://www.nowvideo.sx/api/player.api.php?key=%s&file=%s' % (key, id)
        result = client.request(url)

        url = re.compile('url=(.+?)&').findall(result)[0]
        url += headers

        return url
    except:
        return
Beispiel #34
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = client.request(url, close=False)

        if '>File Not Found<' in result: raise Exception()

        post = {}
        f = client.parseDOM(result, 'form', attrs={'action': ''})
        k = client.parseDOM(f, 'input', ret='name', attrs={'type': 'hidden'})
        for i in k:
            post.update({
                i:
                client.parseDOM(f, 'input', ret='value', attrs={'name': i})[0]
            })
        post.update({'method_free': 'Free Download >>'})
        post.update({'method_premium': '', 'rand': '', 'op': 'download2'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = client.parseDOM(result,
                              'a',
                              ret='href',
                              attrs={'class': 'downloadbtn.+?'})[0]
        url += headers

        return url
    except:
        return
Beispiel #35
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://www.mightyupload.com/embed-%s.html' % url

        result = client.request(url, mobile=True)

        url = re.compile("file *: *'(.+?)'").findall(result)
        if len(url) > 0 and url[0].startswith('http'): return url[0] + headers

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #36
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        result = client.request(url)
        result = result.decode('iso-8859-1').encode('utf-8')

        post = {}
        f = client.parseDOM(result, 'Form', attrs = {'name': 'freeorpremium'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post.update({'method_isfree': 'Click for Free Download'})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)
        result = result.decode('iso-8859-1').encode('utf-8')

        post = {}
        f = client.parseDOM(result, 'Form', attrs = {'name': 'F1'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post.update(captcha.request(result))
        post = urllib.urlencode(post)

        result = client.request(url, post=post)
        result = result.decode('iso-8859-1').encode('utf-8')

        url = client.parseDOM(result, 'a', ret='href', attrs = {'onclick': 'DL.+?'})[0]
        url += headers

        return url
    except:
        return
Beispiel #37
0
def request(url):
    try:
        if '</regex>' in url:
            import regex ; url = regex.resolve(url)

        if url.startswith('rtmp'):
            if len(re.compile('\s*timeout=(\d*)').findall(url)) == 0: url += ' timeout=10'
            return url

        u = urlparse.urlparse(url).netloc
        u = u.replace('www.', '').replace('embed.', '')
        u = u.lower()

        r = [i['class'] for i in info() if u in i['netloc']][0]
        r = __import__(r, globals(), locals(), [], -1)
        r = r.resolve(url)

        if r == None: return r
        elif type(r) == list: return r
        elif not r.startswith('http'): return r

        try: h = dict(urlparse.parse_qsl(r.rsplit('|', 1)[1]))
        except: h = dict('')

        if not 'User-Agent' in h: h['User-Agent'] = client.agent()
        if not 'Referer' in h: h['Referer'] = url

        r = '%s|%s' % (r.split('|')[0], urllib.urlencode(h))
        return r
    except:
        return url
Beispiel #38
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        u = url

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'Form', attrs = {'action': '' })
        f += client.parseDOM(result, 'form', attrs = {'action': '' })
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post.update({'method_free': 'Free Download'})
        post.update(captcha.request(result))
        post = urllib.urlencode(post)

        result = client.request(url, post=post, close=False)

        post = {}
        f = client.parseDOM(result, 'Form', attrs = {'action': '' })
        f += client.parseDOM(result, 'form', attrs = {'action': '' })
        k = client.parseDOM(f, 'input', ret='name', attrs = {'type': 'hidden'})
        for i in k: post.update({i: client.parseDOM(f, 'input', ret='value', attrs = {'name': i})[0]})
        post = urllib.urlencode(post)

        url = client.request(url, post=post, output='geturl')
        if u in url or url in u : return
        return url + headers
    except:
        return
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = urlparse.urlparse(url).query
        url = urlparse.parse_qsl(url)[0][1]
        url = 'http://videomega.tv/cdn.php?ref=%s' % url

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                unpacked += i
        result = unpacked
        result = re.sub('\s\s+', ' ', result)

        url = re.compile('"video".+?"src"\s*\,\s*"(.+?)"').findall(result)
        url += client.parseDOM(result,
                               'source',
                               ret='src',
                               attrs={'type': 'video.+?'})
        url = url[0] + headers

        return url
    except:
        return
Beispiel #40
0
def resolve(url):
    try:
        result = client.request(url, headers={'User-Agent': client.agent()})

        result = result.replace('\r', '').replace('\n', '').replace('\t', '')

        u = re.compile('"\d*/\d*x\d*.+?","(.+?)"').findall(result)[0]
        u = urllib.unquote_plus(u).decode('unicode-escape')
        u = re.compile('(http.+?)\s').findall(u)
        u = [re.sub(r'(=m\d*).+', r'\1', i) for i in u]
        u = sum([tag(i) for i in u], [])

        url = []
        try:
            url += [[i for i in u if i['quality'] == '1080p'][0]]
        except:
            pass
        try:
            url += [[i for i in u if i['quality'] == 'HD'][0]]
        except:
            pass
        try:
            url += [[i for i in u if i['quality'] == 'SD'][0]]
        except:
            pass

        if url == []: return
        return url
    except:
        return
Beispiel #41
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/video/', '/embed/')

        result = client.request(url)

        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: pass
        result += unpacked
        result = re.sub('\s\s+', ' ', result)

        var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)
        for i in range(100):
            for v in var: result = result.replace("' %s '" % v[0], v[1]).replace("'%s'" % v[0], v[1])

        url = re.compile('sources\s*:\s*\[.+?file\s*:\s*(.+?)\s*\,').findall(result)[0]
        var = re.compile('var\s+%s\s*=\s*\'(.+?)\'' % url).findall(result)
        if len(var) > 0: url = var[0].strip()
        url += headers

        if url.startswith('http'): return url 
    except:
        return
Beispiel #42
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        result = client.request(url)

        post = {}
        f = client.parseDOM(result, 'Form', attrs={'name': 'F1'})[0]
        k = client.parseDOM(f, 'input', ret='name', attrs={'type': 'hidden'})
        for i in k:
            post.update({
                i:
                client.parseDOM(f, 'input', ret='value', attrs={'name': i})[0]
            })
        post.update({'method_free': '', 'method_premium': ''})
        post = urllib.urlencode(post)

        result = client.request(url, post=post)

        url = client.parseDOM(result,
                              'a',
                              ret='href',
                              attrs={'id': 'downloadbutton'})[0]
        url += headers

        return url
    except:
        return
Beispiel #43
0
    def get_movie(self, imdb, title, year):
        try:

            q = self.search_link % (urllib.quote_plus(title))
            r = urlparse.urljoin(self.base_link, q)
            headers = {'User-Agent': client.agent()}

            r = client.request(r, headers=headers)

            r = client.parseDOM(r, 'div', attrs={'class': 'ml-item'})
            print("1", r)
            r = [(client.parseDOM(i, 'a',
                                  ret='href')[0], client.parseDOM(i, 'a')[0])
                 for i in r]
            r = [(i[0], re.findall('-(\d+)/',
                                   i[0])[0], client.parseDOM(i[1], 'h2')[0])
                 for i in r]
            r = [i for i in r if cleantitle.get(title) == cleantitle.get(i[2])]

            for i in r:
                try:
                    y, q = cache.get(self.muchmovies_info, 9000, i[1])
                    #print("4",y,q)
                    if not y == year: raise Exception()
                    return urlparse.urlparse(i[0]).path
                except:
                    pass
        except:
            return
Beispiel #44
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        id = re.compile('//.+?/.+?/([\w]+)').findall(url)
        id += re.compile('//.+?/.+?v=([\w]+)').findall(url)
        id = id[0]

        url = 'http://embed.movshare.net/embed.php?v=%s' % id

        result = client.request(url)

        key = re.compile('flashvars.filekey=(.+?);').findall(result)[-1]
        try:
            key = re.compile('\s+%s="(.+?)"' % key).findall(result)[-1]
        except:
            pass

        url = 'http://www.movshare.net/api/player.api.php?key=%s&file=%s' % (
            key, id)
        result = client.request(url)

        url = re.compile('url=(.+?)&').findall(result)[0]
        url += headers

        return url
    except:
        return
Beispiel #45
0
def resolve(url):
    try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        page = 'http://p2pcast.tv/stream.php?id=%s&live=0&p2p=0&stretching=uniform' % page

        result = client.request(page, referer=referer)

        try:
            swf = re.compile(
                'src\s*=[\'|\"](.+?player.+?\.js)[\'|\"]').findall(result)[0]
            swf = client.request(swf)
            swf = re.compile('flashplayer\s*:\s*[\'|\"](.+?)[\'|\"]').findall(
                swf)[0]
        except:
            swf = 'http://cdn.p2pcast.tv/jwplayer.flash.swf'

        url = re.compile('url\s*=\s*[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = base64.b64decode(url)
        url = '%s|User-Agent=%s&Referer=%s' % (
            url, urllib.quote_plus(client.agent()), urllib.quote_plus(swf))

        return url
    except:
        return
Beispiel #46
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://www.mightyupload.com/embed-%s.html' % url

        result = client.request(url, mobile=True)

        url = re.compile("file *: *'(.+?)'").findall(result)
        if len(url) > 0 and url[0].startswith('http'): return url[0] + headers

        result = re.compile('(eval.*?\)\)\))').findall(result)[-1]
        result = jsunpack.unpack(result)

        url = client.parseDOM(result, 'embed', ret='src')
        url += re.compile("file *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = [i for i in url if not i.endswith('.srt')]
        url = 'http://' + url[0].split('://', 1)[-1]
        url += headers

        return url
    except:
        return
Beispiel #47
0
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None: return sources

            content = re.compile('(.+?)\?S\d*E\d*$').findall(url)

            try: url, season, episode = re.compile('(.+?)\?S(\d*)E(\d*)$').findall(url)[0]
            except: pass

            url = urlparse.urljoin(self.base_link, url)

            result = client.source(url)

            if len(content) == 0:
                u = client.parseDOM(result, 'source', ret='src', attrs = {'type': 'video.+?'})[0]
            else:
                u = re.compile('playSeries\((\d+),(%01d),(%01d)\)' % (int(season), int(episode))).findall(result)[0]
                u = self.episode_link % (u[0], u[1], u[2])
                u = urlparse.urljoin(self.base_link, u)
                u = client.source(u)
                u = json.loads(u)['url']

            url = '%s|User-Agent=%s&Referer=%s' % (u, urllib.quote_plus(client.agent()), urllib.quote_plus(url))

            sources.append({'source': 'MovieTV', 'quality': 'HD', 'provider': 'MovieTV', 'url': url})

            return sources
        except:
            return sources
Beispiel #48
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({
            'User-Agent': client.agent(),
            'Referer': url
        })

        url = url.replace('/embed-', '/')
        url = re.compile('//.+?/([\w]+)').findall(url)[0]

        u = 'http://nosvideo.com/vj/video.php?u=%s&w=&h=530' % url

        r = 'http://nosvideo.com/%s' % url
        r = client.request(r, referer='', close=False)
        r = client.parseDOM(r, 'a', ret='href', attrs={'class': 'btn.+?'})[0]

        result = client.request(u, referer=r)

        url = re.compile('var\stracker\s*=\s*[\'|\"](.+?)[\'|\"]').findall(
            result)
        url += re.compile("tracker *: *[\'|\"](.+?)[\'|\"]").findall(result)
        url = base64.b64decode(url[0])
        url += headers

        return url
    except:
        return
Beispiel #49
0
def resolve(url):
    try:
        headers = "|%s" % urllib.urlencode({"User-Agent": client.agent(), "Referer": url})

        id = re.compile("//.+?/.+?/([\w]+)").findall(url)
        id += re.compile("//.+?/.+?v=([\w]+)").findall(url)
        id = id[0]

        url = "http://embed.videoweed.es/embed.php?v=%s" % id

        result = client.request(url)

        key = re.compile("flashvars.filekey=(.+?);").findall(result)[-1]
        try:
            key = re.compile('\s+%s="(.+?)"' % key).findall(result)[-1]
        except:
            pass

        url = "http://www.videoweed.es/api/player.api.php?key=%s&file=%s" % (key, id)
        result = client.request(url)

        url = re.compile("url=(.+?)&").findall(result)[0]
        url += headers

        return url
    except:
        return
Beispiel #50
0
def resolve(url):
    try:
        referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]

        page = urlparse.parse_qs(urlparse.urlparse(url).query)['id'][0]
        page = 'http://p2pcast.tv/stream.php?id=%s&live=0&p2p=0&stretching=uniform' % page

        result = client.request(page, referer=referer)


        try:
            swf = re.compile('src\s*=[\'|\"](.+?player.+?\.js)[\'|\"]').findall(result)[0]
            swf = client.request(swf)
            swf = re.compile('flashplayer\s*:\s*[\'|\"](.+?)[\'|\"]').findall(swf)[0]
        except:
            swf = 'http://cdn.p2pcast.tv/jwplayer.flash.swf'


        url = re.compile('url\s*=\s*[\'|\"](.+?)[\'|\"]').findall(result)[0]
        url = base64.b64decode(url)
        url = '%s|User-Agent=%s&Referer=%s' % (url, urllib.quote_plus(client.agent()), urllib.quote_plus(swf))

        return url
    except:
        return
Beispiel #51
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        url = url.replace('/embed-', '/')
        url = url.replace('/vid/', '/')

        url = re.compile('//.+?/([\w]+)').findall(url)[0]
        url = 'http://movpod.in/embed-%s.html' % url

        result = client.request(url)
        url = re.compile('file *: *"(http.+?)"').findall(result)[-1]

        request = urllib2.Request(url)
        response = urllib2.urlopen(request, timeout=30)
        response.close()

        type = str(response.info()["Content-Type"])

        if type == 'text/html': raise Exception()

        url += headers
        return url
    except:
        return
Beispiel #52
0
def resolve(url):
    try:
        page = re.compile("//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)").findall(url)[0]
        page = "http://%s/embed/%s" % (page[0], page[1])

        try:
            referer = urlparse.parse_qs(urlparse.urlparse(url).query)["referer"][0]
        except:
            referer = page

        result = client.request(page, referer=referer)

        unpacked = ""
        packed = result.split("\n")
        for i in packed:
            try:
                unpacked += jsunpack.unpack(i)
            except:
                pass
        result += unpacked
        result = urllib.unquote_plus(result)
        result = re.sub("\s\s+", " ", result)

        url = client.parseDOM(result, "iframe", ret="src")[-1]
        url = url.replace(" ", "")

        var = re.compile("var\s(.+?)\s*=\s*'(.+?)'").findall(result)
        for i in range(100):
            for v in var:
                url = url.replace("'%s'" % v[0], v[1])
            for v in var:
                url = url.replace("(%s)" % v[0], "(%s)" % v[1])

        url = re.sub(r"'unescape\((.+?)\)'", r"\1", url)
        url = re.sub(r"'(.+?)'", r"\1", url)

        result = client.request(url, referer=referer)

        file = re.compile("'file'.+?'(.+?)'").findall(result)[0]

        try:
            if not file.startswith("http"):
                raise Exception()
            url = client.request(file, output="geturl")
            if not ".m3u8" in url:
                raise Exception()
            url += "|%s" % urllib.urlencode({"User-Agent": client.agent(), "Referer": file})
            return url
        except:
            pass

        strm = re.compile("'streamer'.+?'(.+?)'").findall(result)[0]
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]

        url = "%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=30" % (strm, file, swf, url)
        return url
    except:
        return
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None:
                return sources

            content = re.compile("(.+?)\?S\d*E\d*$").findall(url)

            try:
                url, season, episode = re.compile("(.+?)\?S(\d*)E(\d*)$").findall(url)[0]
            except:
                pass

            url = urlparse.urljoin(self.base_link, url)
            url = urlparse.urljoin(url, "watching.html")

            referer = url

            result = cloudflare.source(url)

            try:
                quality = client.parseDOM(result, "span", attrs={"class": "quality"})[0]
            except:
                quality = "HD"

            if "1080p" in quality:
                quality = "1080p"
            else:
                quality = "HD"

            url = re.compile('var\s+url_playlist *= *"(.+?)"').findall(result)[0]

            result = client.parseDOM(result, "div", attrs={"class": "les-content"})
            result = zip(client.parseDOM(result, "a", ret="onclick"), client.parseDOM(result, "a"))
            result = [(i[0], re.compile("(\d+)").findall(i[1])) for i in result]
            result = [(i[0], "%01d" % int(i[1][0])) for i in result if len(i[1]) > 0]
            result = [(i[0], i[1]) for i in result]
            result = [(re.compile("(\d+)").findall(i[0]), i[1]) for i in result]
            result = [("%s/%s/%s" % (url, i[0][0], i[0][1]), i[1]) for i in result]

            if len(content) == 0:
                url = [i[0] for i in result]
            else:
                episode = "%01d" % int(episode)
                url = [i[0] for i in result if episode == i[1]]

            url = [
                "%s|User-Agent=%s&Referer=%s" % (i, urllib.quote_plus(client.agent()), urllib.quote_plus(referer))
                for i in url
            ]

            for u in url:
                sources.append({"source": "Muchmovies", "quality": quality, "provider": "Muchmoviesv2", "url": u})

            return sources
        except:
            return sources
Beispiel #54
0
    def get_sources(self, url, hosthdDict, hostDict, locDict):
        try:
            sources = []

            if url == None: return sources

            data = os.path.join(control.dataPath, 'movietv.db')
            try: control.deleteFile(data)
            except: pass

            data = os.path.join(control.dataPath, 'movietv2.db')

            download = True

            try: download = abs(datetime.datetime.fromtimestamp(os.path.getmtime(data)) - (datetime.datetime.now())) > datetime.timedelta(days=7)
            except: pass

            if download == True:
                result = client.source(base64.b64decode(self.data_link))
                zip = zipfile.ZipFile(StringIO.StringIO(result))
                zip.extractall(control.dataPath)
                zip.close()

            dbcon = database.connect(data)
            dbcur = dbcon.cursor()


            content = re.compile('(.+?)\?S\d*E\d*$').findall(url)

            try: url, handler = re.compile('(.+?)\?(S\d*E\d*)$').findall(url)[0]
            except: pass

            if len(content) == 0:
                dbcur.execute("SELECT * FROM movies")
                result = dbcur.fetchall()
                result = [eval(i[1].encode('utf-8')) for i in result]
                result = sum(result, [])
                result = [i for i in result if i[0] == url][0]

            else:
                dbcur.execute("SELECT * FROM tvshows")
                result = dbcur.fetchall()
                result = [eval(i[1].encode('utf-8')) for i in result]
                result = sum(result, [])
                result = [i for i in result if i[0] == url]
                result = [i for i in result if i[4] == handler][0]


            url = '%s|User-Agent=%s&Referer=%s' % (result[1], urllib.quote_plus(client.agent()), urllib.quote_plus(urlparse.urljoin(self.base_link, result[0])))

            sources.append({'source': 'MovieTV', 'quality': 'HD', 'provider': 'MovieTV', 'url': url})

            return sources
        except:
            return sources
Beispiel #55
0
def resolve(url):
    try:
        headers = "|%s" % urllib.urlencode({"User-Agent": client.agent(), "Referer": url})

        result = client.request(url, mobile=True)
        url = client.parseDOM(result, "source", ret="src", attrs={"type": "video.+?"})[0]
        url += headers

        return url
    except:
        return
Beispiel #56
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        result = client.request(url, mobile=True)
        url = client.parseDOM(result, 'source', ret='src', attrs = {'type': 'video.+?'})[0]
        url += headers

        return url
    except:
        return
Beispiel #57
0
def resolve(url):
    try:
        page = re.compile('//(.+?)/(?:embed|v)/([0-9a-zA-Z-_]+)').findall(url)[0]
        page = 'http://%s/embed/%s' % (page[0], page[1])

        try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0]
        except: referer = page

        result = client.request(page, referer=referer)


        unpacked = ''
        packed = result.split('\n')
        for i in packed: 
            try: unpacked += jsunpack.unpack(i)
            except: pass
        result += unpacked
        result = urllib.unquote_plus(result)
        result = re.sub('\s\s+', ' ', result)


        url = client.parseDOM(result, 'iframe', ret='src')[-1]
        url = url.replace(' ', '')

        var = re.compile('var\s(.+?)\s*=\s*\'(.+?)\'').findall(result)
        for i in range(100):
            for v in var: url = url.replace("'%s'" % v[0], v[1])
            for v in var: url = url.replace("(%s)" % v[0], "(%s)" % v[1])

        url = re.sub(r"'.+?\((.+?)\)'", r'\1', url)
        url = re.sub(r"'(.+?)'", r'\1', url)


        result = client.request(url, referer=referer)

        file = re.compile("'file'.+?'(.+?)'").findall(result)[0]

        try:
            if not file.startswith('http'): raise Exception()
            url = client.request(file, output='geturl')
            if not '.m3u8' in url: raise Exception()
            url += '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': file})
            return url
            
        except:
            pass

        strm = re.compile("'streamer'.+?'(.+?)'").findall(result)[0]
        swf = re.compile("SWFObject\('(.+?)'").findall(result)[0]
        
        url = '%s playpath=%s swfUrl=%s pageUrl=%s live=1 timeout=30' % (strm, file, swf, url)
        return url
    except:
        return
Beispiel #58
0
def resolve(url):
    try:
        headers = '|%s' % urllib.urlencode({'User-Agent': client.agent(), 'Referer': url})

        result = client.request(url)
        url = re.compile("file *: *'(http.+?)'").findall(result)[-1]
        url += headers

        return url
    except:
        return