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())
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
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)