Beispiel #1
0
 def GetFileHosts(self, url, list, lock, message_queue):
     import re
     import decrypter
     from entertainment.net import Net
     net = Net()
     movielink = net.http_GET(url).content
     try:
         match = re.compile(
             'plugins=http://static1.movsharing.com/plugin.+?/proxy.swf&proxy.link=movs*(.+?)&'
         ).findall(movielink)
         match = match[0].replace('*', '')
         s = decrypter.decrypter(192, 128)
         uncode = s.decrypt(match, 'u3332bcCRs2DvUf17rqq',
                            'ECB').split('\0')[0]
         link = net.http_GET(uncode).content
         match = re.compile('"file":"(.+?)",').findall(link)
         newurl = match[0].replace('\/', '/')
         res = 'SD'
         host = '*GOOGLE.COM'
         self.AddFileHost(list, res, newurl, host)
     except:
         pass
     links = re.compile(
         'rel=".+?" href="(.+?)" target="_blank" title=".+?">Version .+?</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.+?'
     ).findall(movielink)
     for url in links:
         hostname = re.compile('http://(.+?)/').findall(url)
         host = str(hostname).replace('www.', '')
         res = 'SD'
         self.AddFileHost(list, res, url)
Beispiel #2
0
 def run(self):
     r = requests.get(self.url, headers=self.headers)
     soup = BeautifulSoup(r.text, 'lxml')
     nover_info = {
         'name':
         soup.select('.title')[0].get_text(),
         'author':
         soup.select('.book-info h3 span a')[0].string,
         'words_num':
         soup.find('p', {
             'class': "book-grade"
         }).find_all('b')[2].get_text(),
         'introduction':
         soup.select('.book-intro-cnt div')[0].get_text()
     }
     print(nover_info)
     nover_name = nover_info['name']
     chapter_lists = soup.select('.book-chapter-list')
     for chapter_list in chapter_lists:
         chapters = chapter_list.find_all('li')
         for chapter in chapters:
             chapter_id = chapter.find('a')['href'].split('/')[-1]
             chapter_name = chapter.find('a').string
             spider = decrypter(chapter_id)
             chapter_content = spider.run()
             try:
                 self.save_to_txt(nover_name, chapter_name, chapter_content)
                 print(f'章节{chapter_name} 下载成功!')
             except Exception as e:
                 print(f'章节{chapter_name} 下载失败!')
                 print(e.args)
Beispiel #3
0
def GETLINKS(name,url):#  cause mode is empty in this one it will go back to first directory
    link=OPEN_URL(url)
    if "proxy.link=lfv*" in link :
        import base64
        import decrypter
        match = re.compile('proxy\.link=lfv\*(.+?)&').findall(link)
        match = uniqueList(match)
        match = [decrypter.decrypter(198,128).decrypt(i,base64.urlsafe_b64decode('Y0ZNSENPOUhQeHdXbkR4cWJQVlU='),'ECB').split('\0')[0] for i in match]
        print match
        for url in match:

            url = replaceHTMLCodes(url)
            if url.startswith('//') : url = 'http:' + url
            url = url.encode('utf-8')  
            _name=url.split('://')[1] 
            _name=_name.split('/')[0].upper()
            addDir( name+' - [COLOR red]%s[/COLOR]'%_name , url , 200 , '' , '' )
    if "www.youtube.com/embed/" in link :
        r = 'youtube.com/embed/(.+?)"'
        match = re.compile(r,re.DOTALL).findall(link)
        yt= match[0]
        iconimage = 'http://i.ytimg.com/vi/%s/0.jpg' % yt.replace('?rel=0','')
        url = 'plugin://plugin.video.youtube/?path=root/video&action=play_video&videoid=%s' % yt.replace('?rel=0','')
        addDir( name+' - [COLOR red]YOUTUBE[/COLOR]' , url , 200 , iconimage , '' )
    if "dailymotion.com" in link :
        r = 'src="http://www.dailymotion.com/embed/video/(.+?)\?.+?"></iframe>'
        match = re.compile(r,re.DOTALL).findall(link)
        for url in match :
            addDir ( name+' - [COLOR red]DAILYMOTION[/COLOR]' , url , 200 , GETTHUMB(url), '' )
    if "http://videa" in link :
        r = 'http://videa.+?v=(.+?)"'
        match = re.compile(r,re.DOTALL).findall(link)
        for url in match :
            addDir (name+' - [COLOR red]VIDEA[/COLOR]',url,200,'', '' )
            
    if "rutube.ru" in link :
        r = 'ttp://rutube.ru/video/embed/(.+?)\?'
        match = re.compile(r,re.DOTALL).findall(link)
        print match
        for url in match :
            addDir (name+' - [COLOR red]RUTUBE[/COLOR]',url,200,'', '' )
    if 'cdn.playwire.com' in link :
        r = 'data-config="(.+?)"'
        match = re.compile(r,re.DOTALL).findall(link)
        for vid in match :
            if not 'http' in vid:
                    vid='http:'+vid
            url=vid.replace('zeus.json','manifest.f4m')
            addDir (name+' - [COLOR red]PLAYWIRE[/COLOR]',url,200,'', '' )
    if "vk.com" in link :
        r = 'vk.com/(.+?)"'
        match = re.compile(r,re.DOTALL).findall(link)
        for url in match :
            addDir (name+' - [COLOR red]VK.COM[/COLOR]','http://vk.com/'+url,200,'', '' )
    if "mail.ru" in link :
        r = 'http://videoapi.my.mail.ru/videos/embed/(.+?)\.html'
        match = re.compile(r,re.DOTALL).findall(link)
        for url in match :
            addDir (name+' - [COLOR red]MAIL.RU[/COLOR]','http://videoapi.my.mail.ru/videos/%s.json'%url,200,'', '' )            
Beispiel #4
0
    def Resolve(self, url):
        import base64
        import decrypter
        from entertainment.net import Net
        import re
        net = Net(cached=False)
        html = net.http_GET(url).content

        url = re.compile('proxy[.]link=clickplay[*](.+?)"').findall(html)[-1]
        url = decrypter.decrypter(198,128).decrypt(url,base64.urlsafe_b64decode('bW5pcUpUcUJVOFozS1FVZWpTb00='),'ECB').split('\0')[0]
        from entertainment import istream
        play_url = istream.ResolveUrl(url)
        return play_url
Beispiel #5
0
    def Resolve(self, url):
        import base64
        import decrypter
        from entertainment.net import Net
        import re
        net = Net(cached=False)
        html = net.http_GET(url).content

        url = re.compile('proxy[.]link=clickplay[*](.+?)"').findall(html)[-1]
        url = decrypter.decrypter(198, 128).decrypt(
            url, base64.urlsafe_b64decode('bW5pcUpUcUJVOFozS1FVZWpTb00='),
            'ECB').split('\0')[0]
        from entertainment import istream
        play_url = istream.ResolveUrl(url)
        return play_url
Beispiel #6
0
    def lfv_list(self, name, url, image, date, genre, plot, title, show):
        try:
            result = getUrl(url, timeout='30').result
            result = result.replace('<object', '<iframe').replace(' data=', ' src=')
            result = common.parseDOM(result, "div", attrs = { "id": "fullvideo" })[0]
            videos = common.parseDOM(result, "div", attrs = { "class": "et-learn-more.+?" })
        except:
            return

        for video in videos:
            try:
                lang = common.parseDOM(video, "span")[0]
                lang = lang.split("-")[-1].strip()

                if 'proxy.link=lfv*' in video:
                    import decrypter
                    parts = re.compile('proxy[.]link=lfv[*](.+?)&').findall(video)
                    parts = uniqueList(parts).list
                    parts = [decrypter.decrypter(198,128).decrypt(i,base64.urlsafe_b64decode('Y0ZNSENPOUhQeHdXbkR4cWJQVlU='),'ECB').split('\0')[0] for i in parts]
                else:
                    video = video.replace('"//', '"http://')
                    parts = re.findall('"(http://.+?)"', video, re.I)
                    parts = [i for i in parts if any(i.startswith(x) for x in resolver().hostList)]

                count = 0
                for url in parts:
                    count = count + 1

                    name = '%s (%s) %s' % (title, str(count), lang)
                    name = common.replaceHTMLCodes(name)
                    name = name.encode('utf-8')

                    url = common.replaceHTMLCodes(url)
                    if url.startswith('//') : url = 'http:' + url
                    if not any(url.startswith(i) for i in resolver().hostList): continue
                    url = url.encode('utf-8')

                    self.list.append({'name': name, 'url': url, 'image': image, 'date': date, 'genre': genre, 'plot': plot, 'title': title, 'show': show})
            except:
                pass

        return self.list
def PLAYLINKMainServer(name,url):
        req = urllib2.Request(url)
	req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
	response = urllib2.urlopen(req)
	link=response.read()
	response.close()

	try:
                match=re.compile('plugins=http://static1.movsharing.com/plugin.+?/proxy.swf&proxy.link=movs*(.+?)&').findall(link)
                match = match[0].replace('*','') 
                s= decrypter.decrypter(192,128)
                uncode = s.decrypt(match,'u3332bcCRs2DvUf17rqq','ECB').split('\0')[0]
                req = urllib2.Request(uncode)
                req.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
                response = urllib2.urlopen(req)
                link=response.read()
                response.close()
                match=re.compile('"file":"(.+?)",').findall(link)
                newurl = match[0].replace ('\/','/')
                playlist = xbmc.PlayList(1)
                playlist.clear()
                listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png")
                listitem.setInfo("Video", {"Title":name})
                listitem.setProperty('mimetype', 'video/x-msvideo')
                listitem.setProperty('IsPlayable', 'true')
                playlist.add(newurl,listitem)
                xbmcPlayer = xbmc.Player(xbmc.PLAYER_CORE_AUTO)
                xbmcPlayer.play(playlist)
        except:
                match=re.compile('<a rel="nofollow" href="(.+?)" title=').findall(link)
                newurl = match[0]
                print newurl
                resolved_url = urlresolver.HostedMediaFile(newurl).resolve()
                playlist = xbmc.PlayList(1)
                playlist.clear()
                listitem = xbmcgui.ListItem(name, iconImage="DefaultVideo.png")
                listitem.setInfo("Video", {"Title":name})
                listitem.setProperty('mimetype', 'video/x-msvideo')
                listitem.setProperty('IsPlayable', 'true')
                playlist.add(resolved_url,listitem)
                xbmcPlayer = xbmc.Player(xbmc.PLAYER_CORE_AUTO)
                xbmcPlayer.play(playlist)
Beispiel #8
0
 def GetFileHosts(self, url, list, lock, message_queue):
     import re
     import decrypter
     from entertainment.net import Net
     net = Net()
     movielink = net.http_GET(url).content
     try:       
         match=re.compile('plugins=http://static1.movsharing.com/plugin.+?/proxy.swf&proxy.link=movs*(.+?)&').findall(movielink)
         match = match[0].replace('*','') 
         s= decrypter.decrypter(192,128)
         uncode = s.decrypt(match,'u3332bcCRs2DvUf17rqq','ECB').split('\0')[0]
         link = net.http_GET(uncode).content
         match=re.compile('"file":"(.+?)",').findall(link)
         newurl = match[0].replace ('\/','/')
         res = 'SD'
         host='*GOOGLE.COM'
         self.AddFileHost(list, res, newurl, host)
     except: pass
     links=re.compile('rel=".+?" href="(.+?)" target="_blank" title=".+?">Version .+?</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.+?').findall(movielink)        
     for url in links:
         hostname=re.compile('http://(.+?)/').findall(url)
         host = str(hostname).replace('www.','')
         res='SD'
         self.AddFileHost(list, res, url)
def start_decryption():
    dec.decrypter()
    tools.empty_folder('key')
    rst.restore()
    return render_template('restore_success.html')
def GETLINKS(name,url):#  cause mode is empty in this one it will go back to first directory

	links=OPEN_URL(url)
	links= links.split("class='heading-more open'><span>")

	for link in links:
		# try:
			language=link.split('<')[0]
			if len(language)>1:
				addDir ('[COLOR green]%s[/COLOR]'%language, url , 200 , '', '' )

			if "proxy.link=lfv*" in link :
				import base64
				import decrypter
				match = re.compile('proxy\.link=lfv\*(.+?)&').findall(link)
				match = uniqueList(match)
				match = [decrypter.decrypter(198,128).decrypt(i,base64.urlsafe_b64decode('Y0ZNSENPOUhQeHdXbkR4cWJQVlU='),'ECB').split('\0')[0] for i in match]
				print match
				for url in match:

					url = replaceHTMLCodes(url)
					if url.startswith('//') : url = 'http:' + url
					url = url.encode('utf-8')
					_name=url.split('://')[1]
					_name=_name.split('/')[0].upper()
					addDir( name+' - [COLOR red]%s[/COLOR]'%_name , url , 200 , '' , '' )
			if "www.youtube.com/embed/" in link :
				r = 'youtube.com/embed/(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				yt= match[0]
				iconimage = 'http://i.ytimg.com/vi/%s/0.jpg' % yt.replace('?rel=0','')
				url = 'plugin://plugin.video.youtube/play/?video_id=%s' % yt.replace('?rel=0','')
				addDir( name+' - [COLOR red]YOUTUBE[/COLOR]' , url , 200 , iconimage , '' )
			if "dailymotion.com" in link :
				r = 'src="//www.dailymotion.com/embed/video/(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)

				for url in match :
					addDir ( name+' - [COLOR red]DAILYMOTION[/COLOR]' , url , 200 , GETTHUMB(url), '' )
			if "streamable.com" in link :
				# r = 'src="https://streamable.com/s/.+?/(.+?)\?.+?"></iframe>'
				r = '<iframe src="(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match:
					if 'streamable' in url:
						addDir ( name+' - [COLOR red]STREAMABLE[/COLOR]' , url , 200 , GETTHUMB(url), '' )
			if "http://videa" in link :
				r = 'http://videa.+?v=(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					addDir (name+' - [COLOR red]VIDEA[/COLOR]',url,200,'', '' )

			if "rutube.ru" in link :
				r = 'ttp://rutube.ru/video/embed/(.+?)\?'
				match = re.compile(r,re.DOTALL).findall(link)
				print match
				for url in match :
					addDir (name+' - [COLOR red]RUTUBE[/COLOR]',url,200,'', '' )
			if 'cdn.playwire.com' in link :
				r = 'data-config="(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for vid in match :
					if not 'http' in vid:
							vid='http:'+vid
					url=vid.replace('zeus.json','manifest.f4m')
					addDir (name+' - [COLOR red]PLAYWIRE[/COLOR]',url,200,'', '' )
			if "vk.com" in link :
				r = 'vk.com/(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					addDir (name+' - [COLOR red]VK.COM[/COLOR]','http://vk.com/'+url,200,'', '' )
			if "mail.ru" in link :
				r = 'http://videoapi.my.mail.ru/videos/embed/(.+?)\.html'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					addDir (name+' - [COLOR red]MAIL.RU[/COLOR]','http://videoapi.my.mail.ru/videos/%s.json'%url,200,'', '' )
			if "openload.co" in link :
				r = 'data-lazy-src="(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					addDir (name+' - [COLOR red]OPENLOAD.CO[/COLOR]',url,200,'', '' )
				r = 'iframe src="(.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					if 'openload' in url:
						addDir (name+' - [COLOR red]OPENLOAD.CO[/COLOR]',url,200,'', '' )
			if "//player.footballfullmatch" in link :
				r = 'src="(.+?player.footballfullmatch.com.+?)"'
				match = re.compile(r,re.DOTALL).findall(link)
				for url in match :
					addDir (name+' - [COLOR red]FOOTBALLFULLMATCH.COM[/COLOR]',url,200,'', '' )
Beispiel #11
0
                if new_url:
                    new_url = new_url.group(1).replace("\/", "/")

                    headers.update({'Referer':item_url, 'Accept':'*/*', 'Accept-Encoding':'identity;q=1, *;q=0', 'Range':'bytes=0-'})
                    import urllib2
                    try:
                        new_content =  net.http_GET(new_url,headers,auto_read_response=False)
                        play_url = new_content.get_url()
                    except urllib2.HTTPError, error:
                        play_url = error.geturl()
                    
                    return play_url        
                
            else:
                url = re.compile('FlashVars="config=http://filmstream.me/config.xml.+?proxy.link=filmstream\*(.+?)&.+?"').findall(html)[0]
                url = decrypter.decrypter(198,128).decrypt(url,'OdrtKapH2dNRpVHxhBtg','ECB').split('\0')[0]
            
                result = net.http_GET(url).content

                res_name = []
                res_url = []

                r = re.findall('\,(\d+\,\d+)\,\"(http://redirector.googlevideo.com/videoplayback?.*?)\"',result)
                for quality, url in r:
                    if '1920' in quality:
                        quality = '1080P'
                    elif '1280' in quality:
                        quality = '720P'
                    elif '852' in quality:
                        quality = 'SD'
                    else:
Beispiel #12
0
def GETLINKS(name, url):  #  cause mode is empty in this one it will go back to first directory
    link = OPEN_URL(url)
    if "proxy.link=lfv*" in link:
        import base64
        import decrypter

        match = re.compile("proxy\.link=lfv\*(.+?)&").findall(link)
        match = uniqueList(match)
        match = [
            decrypter.decrypter(198, 128)
            .decrypt(i, base64.urlsafe_b64decode("Y0ZNSENPOUhQeHdXbkR4cWJQVlU="), "ECB")
            .split("\0")[0]
            for i in match
        ]
        print match
        for url in match:

            url = replaceHTMLCodes(url)
            if url.startswith("//"):
                url = "http:" + url
            url = url.encode("utf-8")
            _name = url.split("://")[1]
            _name = _name.split("/")[0].upper()
            addDir(name + " - [COLOR red]%s[/COLOR]" % _name, url, 200, "", "")
    if "www.youtube.com/embed/" in link:
        r = 'youtube.com/embed/(.+?)"'
        match = re.compile(r, re.DOTALL).findall(link)
        yt = match[0]
        iconimage = "http://i.ytimg.com/vi/%s/0.jpg" % yt.replace("?rel=0", "")
        url = "plugin://plugin.video.youtube/?path=root/video&action=play_video&videoid=%s" % yt.replace("?rel=0", "")
        addDir(name + " - [COLOR red]YOUTUBE[/COLOR]", url, 200, iconimage, "")
    if "dailymotion.com" in link:
        r = 'src="http://www.dailymotion.com/embed/video/(.+?)\?.+?"></iframe>'
        match = re.compile(r, re.DOTALL).findall(link)
        for url in match:
            addDir(name + " - [COLOR red]DAILYMOTION[/COLOR]", url, 200, GETTHUMB(url), "")
    if "http://videa" in link:
        r = 'http://videa.+?v=(.+?)"'
        match = re.compile(r, re.DOTALL).findall(link)
        for url in match:
            addDir(name + " - [COLOR red]VIDEA[/COLOR]", url, 200, "", "")

    if "rutube.ru" in link:
        r = "ttp://rutube.ru/video/embed/(.+?)\?"
        match = re.compile(r, re.DOTALL).findall(link)
        print match
        for url in match:
            addDir(name + " - [COLOR red]RUTUBE[/COLOR]", url, 200, "", "")
    if "cdn.playwire.com" in link:
        r = 'cdn.playwire.com/bolt.+?data-publisher-id="(.+?)".+?data-config="(.+?)">'
        match = re.compile(r, re.DOTALL).findall(link)
        for id, vid in match:

            url = vid.replace("zeus.json", "manifest.f4m")
            addDir(name + " - [COLOR red]PLAYWIRE[/COLOR]", url, 200, "", "")
    if "vk.com" in link:
        r = 'vk.com/(.+?)"'
        match = re.compile(r, re.DOTALL).findall(link)
        for url in match:
            addDir(name + " - [COLOR red]VK.COM[/COLOR]", "http://vk.com/" + url, 200, "", "")
    if "mail.ru" in link:
        r = "http://videoapi.my.mail.ru/videos/embed/(.+?)\.html"
        match = re.compile(r, re.DOTALL).findall(link)
        for url in match:
            addDir(
                name + " - [COLOR red]MAIL.RU[/COLOR]", "http://videoapi.my.mail.ru/videos/%s.json" % url, 200, "", ""
            )
Beispiel #13
0
    def lfv_list(self, name, url, image, date, genre, plot, title, show):
        try:
            result = getUrl(url, timeout='30').result
            result = result.replace('<object',
                                    '<iframe').replace(' data=', ' src=')
            result = common.parseDOM(result, "div", attrs={"id":
                                                           "fullvideo"})[0]
            videos = common.parseDOM(result,
                                     "div",
                                     attrs={"class": "et-learn-more.+?"})
        except:
            return

        for video in videos:
            try:
                lang = common.parseDOM(video, "span")[0]
                lang = lang.split("-")[-1].strip()

                if 'proxy.link=lfv*' in video:
                    import decrypter
                    parts = re.compile('proxy[.]link=lfv[*](.+?)&').findall(
                        video)
                    parts = uniqueList(parts).list
                    parts = [
                        decrypter.decrypter(198, 128).decrypt(
                            i,
                            base64.urlsafe_b64decode(
                                'Y0ZNSENPOUhQeHdXbkR4cWJQVlU='),
                            'ECB').split('\0')[0] for i in parts
                    ]
                else:
                    video = video.replace('"//', '"http://')
                    parts = re.findall('"(http://.+?)"', video, re.I)
                    parts = [
                        i for i in parts if any(
                            i.startswith(x) for x in resolver().hostList)
                    ]

                count = 0
                for url in parts:
                    count = count + 1

                    name = '%s (%s) %s' % (title, str(count), lang)
                    name = common.replaceHTMLCodes(name)
                    name = name.encode('utf-8')

                    url = common.replaceHTMLCodes(url)
                    if url.startswith('//'): url = 'http:' + url
                    if not any(url.startswith(i) for i in resolver().hostList):
                        continue
                    url = url.encode('utf-8')

                    self.list.append({
                        'name': name,
                        'url': url,
                        'image': image,
                        'date': date,
                        'genre': genre,
                        'plot': plot,
                        'title': title,
                        'show': show
                    })
            except:
                pass

        return self.list