feedparser

Parsing different date formats from feedparser in python?

I'm trying to get the dates from entries in two different RSS feeds through feedparser. Here is what I'm doing: import feedparser as fp reddit = fp.parse("http://www.reddit.com/.rss") cc = fp.parse("http://contentconsumer.com/feed") print reddit.entries[0].date print cc.entries[0].date And here's how they come out: 2008-10-21T22:23:...

Error importing external library within Django template tag library

So I'm attempting to write a Django reusable app that provides a method for displaying your Twitter feed on your page. I know well that it already exists 20 times. It's an academic exercise. :) Directory structure is pretty simple: myproject |__ __init__.py |__ manage.py |__ settings.py |__ myapp |__ __init__.py |__ adm...

problem with class method - cannot get it to work inside foreach loop - php

Hello, I wrote the class Link which has a method shortTolong() this should return the real URL for a shortend url by returning the 'location' response header. i tested it and it works OK here is the code public function shortTolong() { $urlMatch = array(); $ch = curl_init(); $options = array ( ...

feedparser and Google News

I'm trying to download a corpus of news (to try to do some natural language processing) from Google News using the universal feedparser with python. I really know nothing of XML, I'm just using an example of how to use the feedparser. The problem is that I can't find in the dict I get from the RSS feed the content of the news just the ti...

Feedparser - retrieve old messages from Google Reader

I'm using the feedparser library in python to retrieve news from a local newspaper (my intent is to do Natural Language Processing over this corpus) and would like to be able to retrieve many past entries from the RSS feed. I'm not very acquainted with the technical issues of RSS, but I think this should be possible (I can see that, e.g...

[Python] 'import feedparser' works via SSH, but fails when in browser

I installed feedparser via SSH, using $ python setup.py install --home=~/httpdocs/python-libraries/feedparser-4.1/ I did that because I don't seem to have permission to properly run 'python setup.py install' I am running the following python code in 'test.py'. print "Content-type: text/html\n\n" try: import feedparser except: ...

How can I generate RSS with arbitrary tags and enclosures

Right now, I'm using PyRSS2Gen to generate an RSS document (resyndicating a modification of an rss feed that was parsed with feedparser), but I can't figure out how to add uncommon tags to the item. items = [ PyRSS2Gen.RSSItem( title = x.title, link = x.link, description = x.summary, guid = x.link, pubDate = datetime...

Parse Facebook feed datetime in python?

I am reading a Facebook updates feed using the python library 'feedparser'. I loop through the collection of entries in my Django templates, and display the results. The updated field is returned in a big long string, of some format I am unfamiliar with. Tue, 01 Dec 2009 23:55:52 +0000 How can I... A) Use a Django filter to clean th...

Ruby, why FeedNormalizer usage breaks Classifier::CRM114

Hi, Just learning Ruby and found something bizarre (at least for ansi-c programmer). Having Mac OS X 10.6.2, ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0], feed-normalizer 1.5.1 and crm114 1.0.3 require 'rubygems' require 'crm114' require 'feed-normalizer' #FeedNormalizer::FeedNormalizer.parse open("http://news.google.c...

Undesired python feedparser instantiation relic

Question: How do I kill an instantiation or insure i'm creating a new instantiation of the python universal feedparser? Info: I'm working on a program right now that downloads and catalogs large numbers of blogs. It has worked well so for except for an unfortunate bug. My code is set up to take a list of blog urls and run them throug...

Feedly.com development and feed parser

Is http://feedly.com built using PHP, Java, or some other language/framework? I have googled for some information on it, and saw that it uses JSON/REST extensively. But, I am not sure as to what feed parser is used to render images and videos into the application so elegantly, ie: ...

jQuery External RSS Feed Parser?

I've been looking around for a decent jQuery feed/XML parser and found good plugins like jFeed and jParse (among a few others). None of these support retrieving an external feed though, which is something I'm after. Pretty sure this is down to jQuery's $.ajax() method rather than the plugins themselves (as they'll be built from this). ...

Checking for updated RSS feeds with Feedzirra

Hi All, I am using Feedzirra to parse my RSS feeds and it works very well -- it is twice as fast Feed Normalizer in my initial testing. More importantly, it has nice wrappers that check for updated entries inside a feed. When I was using its feed-update approach, I ran into some issues: require 'feedzirra' feed = Feedzirra::Feed.fetc...

RSS.NET unable to parse feedburner feeds

I'm using RSS.NET for .NET 2.0. Try as I might, I get 0 channels for the following: feed = RssFeed.Read("http://feeds.feedburner.com/punchfire?format=xml"); I note that for other feeds this works e.g. feed = RssFeed.Read("http://www.engadget.com/rss.xml"); I guess it has to be a valid xml document. Do you think I should check for ".x...

Restricting RSS elements by date with feedparser. [Python]

I iterate a RSS feed like so where _file is the feed d = feedparser.parse(_file) for element in d.entries: print repr(element.date) The date output comes out like so u'Thu, 16 Jul 2009 15:18:22 EDT' I cant seem to understand how to actually quantify the above date output so I can use it to limit feed elements. I So what I am ...

RSS feed parser library in Python

Hello, I am looking for a good library in python that will help me parse RSS feeds. Has anyone used feedparser? Any feedback? ...

showing list item in python

Hello, I want to manipulate feed which contains frequently updated (with time) contents using feed parser. Goal is to show all the contents of the updated feed. import feedparser d = feedparser.parse("some URL") print "Information of user" i = range(10) for i in d: print d.entries[i].summary print " " As parsing data is lis...

Feedparser newbie questions

Hi all, After a break from Python(and I knew very little then!) I'm coming back to it for a project(hopefully!). I want to do some parsing using Feedparser & need a few hints to start. Before anyone shouts, I have searched Google and read the docs, but I'm a bit too rusty unfortunately!(So please don't lmgtfy me!) If I have a rss fee...

Feedparser-basics how to

I'm very new to Feedparser and have returned to Python after a long break so would appreciate any help. I've tried the docs, which are very good, but I'm still slightly lagging. How would I get Feedparser to take an rss feed and from that get the title and description of the first 10 items and label each item independently so that they...

Why aren't there any dates in the Netflix.com NewWatchInstantlyRSS feed entries (when parsed with feedparser)?

The output from the following: import feedparser d = feedparser.parse('http://www.netflix.com/NewWatchInstantlyRSS') d.entries[177].keys() is: ['summary_detail', 'links', 'title', 'summary', 'guidislink', 'title_detail', 'link', 'id'] According to http://feedparser.org/docs/common-rss-elements.html, there should be a "date" element...