def getVCDQ(url):

	d = feedparser.parse( url )
	common.Notification("Navigating to ",d['feed']['title'])
	mylist= list()




        for span in d.entries:
            rssname = span.title
	    myPlot = span.description
            parser = MovieParser()
	    parser.data = rssname
            parser.parse()
            myName = parser.name 
            myYear = parser.year

            #year = s[len(s)-7 : len(s)]
            #year = year.replace('(','').replace(')','')
	    #year = year.strip()
            #s = s.split('(',1)[0].strip()
            #s = s.replace(', The','')
				
            #print s

	    s = myName + '(' + str(myYear) + ')'
	    if s in mylist:
		continue
	    else:
	        common.createMovieListItem(s,myName,myYear,len(d.entries))
		mylist.append(s)
		
        common.endofDir()
        return
def getVCDQ(url):

    d = feedparser.parse(url)
    common.Notification("Navigating to ", d['feed']['title'])
    mylist = list()

    for span in d.entries:
        rssname = span.title
        myPlot = span.description
        parser = MovieParser()
        parser.data = rssname
        parser.parse()
        myName = parser.name
        myYear = parser.year

        #year = s[len(s)-7 : len(s)]
        #year = year.replace('(','').replace(')','')
        #year = year.strip()
        #s = s.split('(',1)[0].strip()
        #s = s.replace(', The','')

        #print s

        s = myName + '(' + str(myYear) + ')'
        if s in mylist:
            continue
        else:
            common.createMovieListItem(s, myName, myYear, len(d.entries))
            mylist.append(s)

    common.endofDir()
    return
Example #3
0
def mindful_moments(request):
    blog_posts = feedparser.parse("http://procrastinateless.wordpress.com/feed/")
    html = []
    for entry in blog_posts.entries[:5]:
        html.append(
            render_string(
                request, "procrasdonate/snippets/post.html", {"post": {"title": entry.title, "link": entry.link}}
            )
        )
    return json_success({"html": "".join(html)})
def getpopular(url):

	d = feedparser.parse( url )
	mylist= list()
	html = d.entries[0]['content'][0]['value'].replace('\n','')
	entries = re.findall(r'<a href="http://www.imdb.com/title/tt(\d{7})/">',html)
	for entry in entries:
		imdbid = entry
		common.createMovieListItemfromimdbid(imdbid,len(entries))
	common.endofDir()
        return
Example #5
0
def getpopular(url):

    d = feedparser.parse(url)
    mylist = list()
    html = d.entries[0]['content'][0]['value'].replace('\n', '')
    entries = re.findall(r'<a href="http://www.imdb.com/title/tt(\d{7})/">',
                         html)
    for entry in entries:
        imdbid = entry
        common.createMovieListItemfromimdbid(imdbid, len(entries))
    common.endofDir()
    return
Example #6
0
def mindful_moments(request):
    blog_posts = feedparser.parse(
        "http://procrastinateless.wordpress.com/feed/")
    html = []
    for entry in blog_posts.entries[:5]:
        html.append(
            render_string(request, 'procrasdonate/snippets/post.html',
                          {'post': {
                              'title': entry.title,
                              'link': entry.link
                          }}))
    return json_success({'html': ''.join(html)})
Example #7
0
def procrasdonate_tweets(request):
    procrasdonate_tweets = feedparser.parse("http://twitter.com/statuses/user_timeline/30937077.rss")
    html = []
    for entry in procrasdonate_tweets.entries[:5]:
        title = url_in_text.sub("", entry.title)
        tweet_link = entry.link
        urls = url_in_text.findall(entry.title)
        link = urls and urls[0] or ""
        html.append(
            render_string(
                request,
                "procrasdonate/snippets/tweet.html",
                {"post": {"title": title, "tweet_link": tweet_link, "link": urls and urls[0] or ""}},
            )
        )
    return json_success({"html": "".join(html)})
Example #8
0
def procrasdonate_tweets(request):
    procrasdonate_tweets = feedparser.parse(
        "http://twitter.com/statuses/user_timeline/30937077.rss")
    html = []
    for entry in procrasdonate_tweets.entries[:5]:
        title = url_in_text.sub('', entry.title)
        tweet_link = entry.link
        urls = url_in_text.findall(entry.title)
        link = urls and urls[0] or ''
        html.append(
            render_string(
                request, 'procrasdonate/snippets/tweet.html', {
                    'post': {
                        'title': title,
                        'tweet_link': tweet_link,
                        'link': urls and urls[0] or ''
                    }
                }))
    return json_success({'html': ''.join(html)})