Example #1
0
def SGTVLINKPAGE(url,name,thumb,mainimg):
   try:        
        params = {'url':url, 'mode':mode, 'name':name, 'thumb':thumb, 'dlfoldername':dlfoldername,'mainimg':mainimg}
        inc = 0
        linkbase = 'http://seriesgate.me'
        mainimg = mainimg
        #link = net.http_GET(url).content
        #match=re.compile('href="(.+?)">More Links').findall(link)
        #for surl in match:
           #url = linkbase + surl
        #url = url +'searchresult/'    
            
                
  
        
        print 'host url look is' + url    
            
                   
        if inc < 50:
                 link = net.http_GET(url).content
                 #hostmatch=re.compile('<a rel="nofollow" href="(.+?)" TARGET="_blank" >(.+?)</a>').findall(link)
                 hostmatch=re.compile('hre_watch_tt" href="(.+?)">').findall(link)
                 #for urls,sourcename in hostmatch:
                 for urls in hostmatch:        
                   print 'Pre HMF url is  ' +urls
                   hmf = urlresolver.HostedMediaFile(urls)
                  ##########################################
                   print 'URLS is ' +urls
                   if hmf:
                          #try:
                                  host = hmf.get_host()
                                  hthumb = main.GETHOSTTHUMB(host)
                                  #dlurl = urlresolver.resolve(vidUrl)
                                  data = main.GRABTVMETA(name,'')
                                  thumb = data['cover_url']
                                  favtype = 'movie'
                                  hostname = main.GETHOSTNAME(host)
                                  try:    
                                        main.addTVDLDir(name+hostname,urls,'vidpage',hthumb,data,dlfoldername,favtype,mainimg)
                                        inc +=1
                                  except:
                                        continue
   except Exception:
        buggalo.onExceptionRaised()                                   
Example #2
0
def TVLINKPAGE(url,name,thumb,mainimg):
   try:        
        params = {'url':url, 'mode':mode, 'name':name, 'thumb':thumb, 'dlfoldername':dlfoldername,'mainimg':mainimg}
        inc = 0
        mainimg = mainimg
        link = net.http_GET(url).content
        match=re.compile('<span class="movie_version_link">.+?<a href="(.+?)"').findall(link)
  
        for url in match:
           if 'http://' not in url:     
                 url = base_url + url
           print 'host url look is' + url    
            
                   
           if inc < 50:
                 link = net.http_GET(url).content
                 hostmatch=re.compile('name="bottom" src="(.+?)"/>\n</frameset>').findall(link)        
                 for urls in hostmatch:
                   print 'Pre HMF url is  ' +urls
                   hmf = urlresolver.HostedMediaFile(urls)
                  ##########################################
                   print 'URLS is ' +urls
                   if hmf:
                          #try:
                                  host = hmf.get_host()
                                  hthumb = main.GETHOSTTHUMB(host)
                                  #dlurl = urlresolver.resolve(vidUrl)
                                  data = main.GRABTVMETA(name,'')
                                  thumb = data['cover_url']
                                  favtype = 'movie'
                                  hostname = main.GETHOSTNAME(host)
                                  try:    
                                        main.addTVDLDir(name+hostname,urls,'vidpage',hthumb,data,dlfoldername,favtype,mainimg)
                                        inc +=1
                                  except:
                                        continue
   except Exception:
        buggalo.onExceptionRaised()
Example #3
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