A time waster/distraction
Aviss,Tyler
tjaviss-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Jun 23 23:15:32 UTC 2009
Wow, I was actually commenting that it shouldn't be hard for me to
figure out, not that I was expecting somebody else to do the work.
Thankee, perhaps regular amusing backgrounds may help push my GF to
use her Linux desktop more often
(sent from my phone, so please excuse the typos)
On 23-Jun-09, at 3:05 PM, Jamon Camisso <jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org>
wrote:
> Tyler Aviss wrote:
>> Hmm. Translating an RSS feed to a picture-puller shouldn't be too
>> hard. Easier (and more polite) than a screen-scraper too. Thanks :-)
>
> Here:
>
> #!/usr/bin/python
>
> import urllib2
> import xml.dom.minidom as DOM
>
> i = []
> can = 'http://feeds.feedburner.com/ICanHasCheezburger'
> has = urllib2.urlopen(can).readlines()
> cheez = DOM.parseString(''.join(has))
>
> ichcb_url = 'http://icanhascheezburger.files.wordpress.com'
>
> for burger in cheez.getElementsByTagName('media:content'):
> burger = burger.attributes.get('url').value
> if burger.startswith(ichcb_url):
> i.append(burger)
>
> for ICanHasCheezburger in i:
> print ICanHasCheezburger
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list