View Single Post
Old 02-23-2013, 09:25 PM   #5
ezyang
Junior Member
ezyang began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2013
Location: Stanford, CA
Device: Kindle Paperwhite
OK, at the moment, I have this horrible hack:

Code:
    def postprocess_html(self, soup, first_fetch):
        for e in soup.findAll('a'):
            e['href'] = "http://s2r.me/" + e['href']
        return soup
Probably could be made more robust...
ezyang is offline   Reply With Quote