Beispiel #1
0
def VIDEOLINKS(name, url, thumb):
    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()
    match = re.compile('href="/movies/ext/(.+?)"').findall(link)
    for num in match:
        url = base_url + '/movies/ext/' + num
        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()
        url = response.geturl()

        if url:
            hmf = urlresolver.HostedMediaFile(url)
            if hmf:
                host = hmf.get_host()
                hthumb = main.GETHOSTTHUMB(host)
                try:
                    main.addHDir(name, url, 'resolve', thumb, hthumb)
                except:
                    continue
Beispiel #2
0
def VIDEOLINKS(url, name, thumb):
    link = net.http_GET(url).content
    match = re.compile('<iframe src="(.+?)"').findall(link)
    for url in match:
        if main.resolvable(url):
            hthumb = main.GETHOSTTHUMB(main.getHost(url))
            try:
                main.addHDir(name, url, 'resolve', thumb, hthumb)
            except:
                continue
Beispiel #3
0
def VIDEOLINKS(url,name,thumb):
        link = net.http_GET(url).content
        match=re.compile('<a target="_blank" id="hovered" href="(.+?)">.+?</a>').findall(link)
        for url in match:
                if main.resolvable(url):
                        hthumb = main.GETHOSTTHUMB(main.getHost(url))
                try:
                        main.addHDir(name,hmf.get_url(),'resolve',thumb,hthumb)
                except:
                        continue
Beispiel #4
0
def VIDEOLINKS(name, url, thumb):
    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()
    match = re.compile("<a target='_blank' href='(.+?)'>").findall(link)
    for url in match:
        hmf = urlresolver.HostedMediaFile(url)
        if hmf:
            host = hmf.get_host()
            hthumb = main.GETHOSTTHUMB(host)
            main.addHDir(name, url, 'resolve', thumb, hthumb)
Beispiel #5
0
def VIDEOLINKS(name,url,thumb):
        inc = 0
        link = net.http_GET(url).content
        match=re.compile('<td class="sideleft"><a href="(.+?)"').findall(link)
        for url in match:
                if inc < 50:
                        link = net.http_GET(url).content
                        urls=re.compile('<iframe name="frame" class="frame" src="(.+?)"').findall(link)

                        hmf = urlresolver.HostedMediaFile(urls[0])
                        if hmf:
                                host = hmf.get_host()
                                hthumb = main.GETHOSTTHUMB(host)
                                try:
                                        main.addHDir(name,str(urls[0]),'resolve',thumb,hthumb)
                                        inc +=1
                                except:
                                        continue
Beispiel #6
0
def VIDEOLINKS(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()
    match = re.compile(
        '<p><a href="(.+?)" rel="nofollow">.+?</a></p>').findall(link)
    for url in match:
        hmf = urlresolver.HostedMediaFile(url)
        hthumb = main.GETHOSTTHUMB(hmf.get_host())
        if hmf:
            try:
                main.addHDir(name, url, 'resolve', '', hthumb)
            except:
                continue
Beispiel #7
0
def VIDEOLINKS(name, url, thumb):
    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()
    match = re.compile('<a\nhref="(.+?)" class="ext-link"').findall(link)
    for url in match:
        head, sep, tail = url.partition('=')
        hmf = urlresolver.HostedMediaFile(tail)
        if hmf:
            host = hmf.get_host()
            hthumb = main.GETHOSTTHUMB(host)
            try:
                main.addHDir(name, tail, 'resolve', thumb, hthumb)
            except:
                continue
Beispiel #8
0
def VIDEOLINKS(url, name, thumb):
    link = net.http_GET(url).content
    match = re.compile(
        '<input type=button value="(.+?)" onClick="javascript:popUp((.+?))">'
    ).findall(link)
    for host, url, url2 in match:
        url = base_url + url
        url = re.sub("[')(]", '', url)
        link = net.http_GET(url).content
        links2 = re.compile(
            '<frameset  cols=".+?">\n  <frame src="(.+?)" />\n  <frame src=".+?" />'
        ).findall(link)
        if len(links2) > 0:
            url = str(links2[0])
        if main.resolvable(url):
            hthumb = main.GETHOSTTHUMB(main.getHost(url))
        try:
            main.addHDir(name, url, 'resolve', thumb, hthumb)
        except:
            continue
Beispiel #9
0
def VIDEOLINKS(name, url, thumb):
    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()
    match = re.compile('<a href="(.+?)" target="_blank">').findall(link)
    for url in match:
        if 'vidx.to' in url:
            main.addHDir(name, url, 'resolve', thumb,
                         artwork + 'hosts/vidx.png')

        else:
            hmf = urlresolver.HostedMediaFile(url)
            if hmf:
                host = hmf.get_host()
                hthumb = main.GETHOSTTHUMB(host)
                try:
                    main.addHDir(name, url, 'resolve', thumb, hthumb)
                except:
                    continue
Beispiel #10
0
def TVLINKPAGE(url,name,thumb,mainimg):
        params = {'url':url, 'mode':mode, 'name':name, 'thumb':thumb, 'dlfoldername':dlfoldername,'mainimg':mainimg}
        inc = 0
        mainimg = mainimg
        showname = name
        if settings.getSetting('tmovies_account') == 'true':  
              net.set_cookies(cookiejar)    
        link = net.http_GET(url).content
        link=link.replace('\r','').replace('\n','').replace('\t','').replace(' ','')
        match=re.compile('href="http://twomovies.name/full_movie(.+?)"target="_blank"').findall(link)
        #match=re.compile('href="(.+?)" target=".+?" rel=".+?" onclick=".+?">Full Movie</a>').findall(link)
        for url in match:
          url = 'http://twomovies.name/full_movie'+url         
          '''if inc < 50:
                        link = net.http_GET(url).content
                        urls=re.compile('<iframe.*?src="(http://.+?)".*?>').findall(link)

                        hmf = urlresolver.HostedMediaFile(urls[0])'''
          if inc < 50:
                  #This gets around the Continue Button
                link = net.http_GET(url).content 
                conmatch=re.compile('/>Please click (.+?):</p>').findall(link)
                #formmatch=re.compile('input class="(.+?)" type="(.+?)" value="(.+?)" name="(.+?)" /').findall(link)
                for button in conmatch:
                        if 'continue button' in conmatch:
                                        conmatch =str(conmatch)
                                        print 'Button SAYS ' +conmatch
                                        url = url
                                        header_dict = {}
                                        header_dict['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
                                        header_dict['Connection'] = 'keep-alive'
                                        header_dict['Content-Type'] = 'application/x-www-form-urlencoded'
                                        header_dict['Host'] = 'twomovies.name'
                                        header_dict['Referer'] = url
                                        header_dict['User-Agent'] = 'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36'
                                        
                                        form_data = {'confirm':'Continue'}
                                        net.set_cookies(cookiejar)
                                        conbutton = net.http_POST(url, form_data=form_data,headers=header_dict)
                                
                  #This gets around the Continue Button
                #link = net.http_GET(url).content  
                matchurl=re.compile('go=(.+?)"').findall(link)
                #print 'MY LINK URL IS '+ urls
                for urls in matchurl:
  ################srting conversion########################
                   urls = str(urls)
                   print 'LINK URL AFTER STRING is' +urls
##################Try to replace urlparts##################
                 
                   urls = urls.replace('&rel=nofollow','')
                  
                  ##########################################      
                  #returns true or false media file resolve  
                   hmf = urlresolver.HostedMediaFile(urls)
                  ##########################################
                   if hmf:
                                host = hmf.get_host()
                                hthumb = main.GETHOSTTHUMB(host)
                                #dlurl = urlresolver.resolve(url)
                                data = main.GRABTVMETA(showname,'')
                                thumb = data['cover_url']
                                favtype = 'tvshows'
                                try:    
                                        main.addTVDLDir(showname,urls,'vidpage',hthumb,data,dlfoldername,favtype,mainimg)
                                        inc +=1
                                except:
                                        continue