예제 #1
0
def getEasyListing(url):
        res=[]
        f=urllib.urlopen(url)
        a=f.read()
        f.close()

	prevPage=re.compile(r'<a id="prevP" href="(.*)" rel="prev">')
	match=prevPage.findall(a)
	for url in match:
		info = IMDbClient._Info()
		url= ("http://members.easynews.com"+url).replace("http://", "http://"+settings[ "username" ]+":"+settings[ "password" ]+"@")
		info.title = "!Previous!"		
		info.poster = None
		addDir(info.title,url,1,info)
		del info

	easyParse = re.compile(r'<td class="subject" ><a href="(.*)" target="subjTarget" >(.*)</a>   <a href="/header2.html' )
	items= easyParse.findall(a)
	for target,title in items:      
                res.append((title,target.replace("http://", "http://"+settings[ "username" ]+":"+settings[ "password" ]+"@")))

	nextPage=re.compile(r'<a id="nextP" href="(.*)" rel="next">')
	match=nextPage.findall(a)
	for url in match:
		info = IMDbClient._Info()
		url = url.replace("&amp;", "&")
		url = url.replace("&gps", "gps")
		url= ("http://members.easynews.com"+url).replace("http://", "http://"+settings[ "username" ]+":"+settings[ "password" ]+"@")
		print "NEXT EASY: "+url
		info.title = "~Next~"
		info.poster = None
		addDir(info.title,url,1,info)
		del info

        return res
예제 #2
0
def getChannelFeed(url,name):
	IMDbFetcher = IMDbClient.IMDbFetcher()	
        res=[]
        f=urllib.urlopen(url)
        a=f.read()
        f.close()
        p=re.compile(r'us.imdb.com/Title(........)')
	prevPage=re.compile(r'<a href="(.*)">Prev Page</a>')
	match=prevPage.findall(a)
	for url in match:
		info = IMDbClient._Info()
		url= "http://www.vcdquality.com/"+url
		info.title = "~Next~"
		info.poster = None
		res.append((url,info,1))
		del info

	
	
        match=p.findall(a)
	start_threads()
        for url in match:
		url = "http://us.imdb.com/Title"+url
		if (url.strip() != ""):			 
			#STANDARD use:
			put(url)	
	stop_threads()
	for info in get_all(): 
		url = "http://members.easynews.com/global4/search.html?gps="+urllib.quote_plus(info.title)+"&sbj=&from=&ns=&fil=&fex=&vc=&ac=&fty[]=MOVIE&s1=nsubject&s1d=%2B&s2=nrfile&s2d=%2B&s3=dsize&s3d=%2B&pby=100&pno=1&sS=0&u=1&svL=&d1=&d1t=&d2=&d2t=&b1=&b1t=&b2=&b2t=&px1=&px1t=&px2=&px2t=&fps1=&fps1t=&fps2=&fps2t=&bps1=&bps1t=&bps2=&bps2t=&hz1=&hz1t=&hz2=&hz2t=&rn1=&rn1t=&rn2=&rn2t=&fly=2";	
		url = url.replace("http://", "http://"+settings[ "username" ]+":"+settings[ "password" ]+"@")
		res.append((url,info,2))
		

	
	nextPage=re.compile(r'<a href="(.*)">Next Page</a>')	
	match=nextPage.findall(a)
	for url in match:
		info = IMDbClient._Info()
		url= "http://www.vcdquality.com/"+url
		info.title = "!Previous!"
		info.poster = None
		res.append((url,info,1))
		del info
        return res
예제 #3
0
def process_queue():
    flag='ok'
    while flag !='stop':
        try:
            flag,item=Qin.get() #will wait here!
            if flag=='ok':
                IMDbFetcher = IMDbClient.IMDbFetcher()
		newdata = IMDbFetcher.fetch_info( item, "512" )
		newdata.imdb = url
                Qout.put(newdata)
        except:
            Qerr.put(err_msg())
예제 #4
0
def getListings(url,imdb):
	IMDbFetcher = IMDbClient.IMDbFetcher()
	info = IMDbFetcher.fetch_info( imdb, "512" )
        shows=getEasyListing(url)
        for title,link in shows:
                addLink(title,link,info)
예제 #5
0
def showCats():
	info = IMDbClient._Info()
	info.poster = None
        cat=[("http://www.vcdq.com/index.php?genre=5", "VCDQuality DVD RIPs")]
        for url,name in cat:
                addDir(name,url,1,info)