def VIDEOLINKS(name, url, thumb, favtype): params = {"url": url, "name": name, "thumb": thumb, "favtype": favtype} link = net.http_GET(url).content match = re.compile('id="flashContent" data-videosrc="(.+?)"\n data-videodata="(.+?)"></div>').findall(link) matchyear = re.compile('<span class="year">(.+?)</span>').findall(link) for url, url2 in match: # if 'undefined' in url: url = url2 for year in matchyear: link = net.http_GET(url).content url = URL + url match4 = re.compile( '"poster":"(.+?)","slider":".+?","duration":.+?,"rating":"(.+?)","language":".+?","cuepoints":".+?","urls":{".+?":"(.+?)"}' ).findall(link) for thumb, rating, url in match4: # replace odd strings thumb = thumb.replace("\/", "/") url = url.replace("\/", "/") mainimg = thumb link = net.http_GET(url).content match3 = re.compile("RESOLUTION=864x480\r\n(.+?)\r\n#").findall(link) for url in match3: print "Thumb is" + thumb print "Playurl is" + url print "Name is" + name # addLink(name,url,thumb) # addlinkDir(name + year,url,'addlink',thumb) main.addDLDir( name + year + " Rated- " + rating, url, "addlink", thumb, "", name + year, favtype, mainimg ) main.AUTO_VIEW("movies")
def VIDEOLINKS(name, url, thumb, favtype): params = {'url': url, 'name': name, 'thumb': thumb, 'favtype': favtype} link = OPEN_URL(url).replace('\n', '').replace('\r', '').replace(' ', '') #link = net.http_GET(url).content.replace('\n','').replace('\r','').replace(' ','') match = re.compile( 'id="flashContent"data-videosrc="(.+?)"data-videodata="(.+?)"></div>' ).findall(link) matchyear = re.compile('<spanclass="year">(.+?)</span>').findall(link) for url, url2 in match: #if 'undefined' in url: url = url2 for year in matchyear: link = net.http_GET(url).content url = URL + url match4 = re.compile( '"poster":"(.+?)","slider":".+?","duration":.+?,"rating":"(.+?)","language":".+?","cuepoints":".+?","urls":{".+?":"(.+?)"}' ).findall(link) for thumb, rating, url in match4: #replace odd strings thumb = thumb.replace("\/", "/") url = url.replace("\/", "/") mainimg = thumb favtype = 'movies' link = net.http_GET(url).content match3 = re.compile( 'RESOLUTION=864x480\r\n(.+?)\r\n#').findall(link) for url in match3: main.addDLDir(name + year + ' Rated- ' + rating, url, 'addlink', thumb, '', name + year, favtype, mainimg) main.AUTO_VIEW('movies')
def ZEEVIDPAGE(url,name): dlfoldername = name titlename = name link = net.http_GET(url).content match=re.compile('target="_blank" href="(.+?)"> <b> Watch Full </b></a> </td>').findall(link) for urls in match: hmf = urlresolver.HostedMediaFile(urls) ########################################## print 'URLS is ' +urls print 'Pre HMF url is ' +urls if hmf: #try: host = hmf.get_host() hthumb = main.GETHOSTTHUMB(host) favtype = 'movie' hostname = main.GETHOSTNAME(host) main.addDLDir(titlename+hostname,urls,'vidpage',hthumb,'',dlfoldername,favtype,'') favtype = 'movie' main.AUTO_VIEW('')
def VIDEOLINKS(name,url,thumb,favtype): params = {'url':url, 'name':name, 'thumb':thumb, 'favtype':favtype} link=OPEN_URL(url).replace('\n','').replace('\r','').replace(' ','') #link = net.http_GET(url).content.replace('\n','').replace('\r','').replace(' ','') match=re.compile('id="flashContent"data-videosrc="(.+?)"data-videodata="(.+?)"></div>').findall(link) matchyear=re.compile('<spanclass="year">(.+?)</span>').findall(link) for url,url2 in match: #if 'undefined' in url: url = url2 for year in matchyear: link = net.http_GET(url).content url = URL + url match4=re.compile('"poster":"(.+?)","slider":".+?","duration":.+?,"rating":"(.+?)","language":".+?","cuepoints":".+?","urls":{".+?":"(.+?)"}').findall(link) for thumb,rating,url in match4: #replace odd strings thumb = thumb.replace("\/","/") url = url.replace("\/","/") mainimg = thumb favtype = 'movies' link = net.http_GET(url).content match3=re.compile('RESOLUTION=864x480\r\n(.+?)\r\n#').findall(link) for url in match3: main.addDLDir(name + year + ' Rated- ' +rating,url,'addlink',thumb,'',name + year,favtype,mainimg) main.AUTO_VIEW('movies')
def LINKPAGE(url,name): inc = 0 movie_name = name[:-6] year = name[-6:] movie_name = movie_name.decode('UTF-8','ignore') dlfoldername = name if settings.getSetting('tmovies_account') == 'true': net.set_cookies(cookiejar) link = net.http_GET(url).content match=re.compile('href="(.+?)" title=(.*?)').findall(link) for url,linkname in match: if inc < 50 and "full" in url: #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) for urls in matchurl: ################srting conversion######################## urls = str(urls) print 'First urls is ' +urls ##################Try to replace urlparts################## urls = urls.replace('&rel=nofollow','') #hmf = urlresolver.HostedMediaFile(urls[0]) ########################################## #returns true or false media file resolve 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.GRABMETA(movie_name,year) thumb = data['cover_url'] favtype = 'movie' mainimg = thumb try: main.addDLDir(movie_name,urls,'vidpage',hthumb,data,dlfoldername,favtype,mainimg) inc +=1 except: continue