extract links from craigslist rdf feeds with python

note the use of urlfetch — i’m using this in an app engine application.

from BeautifulSoup import BeautifulSoup

class RDF(dict):
  def __init__(self, url):
    try:
      self['contents'] = BeautifulSoup(urlfetch.fetch(url).contents)
    except:
      self['contents'] = ”
  def links(self):
    [ item['rdf:about'] for item in self['contents'].findAll(’item’) ] 

if __name__ == ‘__main__’
  from __main__ import RDF
 
Posted at 8pm on 07/02/08 | no comments | Filed Under: personal read on

problems with google app engine

if you’re just getting started with app engine, you’ll encounter limitations, some more debilitating than others. i’ll keep a list of those i encounter.

  1. currently, you can’t import urllib2. you’re limited to using urlfetch. urlfetch is decent, but you’d have to re-write/tweak parts of existing libraries that use the ubiquitious urllib2. for example, say goodbye to using the Universal Feed Parser without significant hacking. in the interim, i’m able to use
Posted at 8pm on 07/02/08 | no comments | Filed Under: personal read on

About

i’m huned. i build interesting companies with people i love. i am available for consulting. resume | linked in

Flickr Photos

simar hates on gandhii want onemuffin top :(bottle on table by wallbarack's following me on twittercookiesYOUTUBE BUT WITH NETFLIX AND GIRLZjamie hatesa big huge candylitter me notnatalie and visnuBADASS!too much recursion!firefox certificate NOT HUNEDthis is what i seecomerford alleycomerford alleycomerford alley

View All Photos