Thread: Url Cover
View Single Post
Old 12-03-2012, 01:26 PM   #5
juandp77
Junior Member
juandp77 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: kindle paperwhite
this is the recipe code that I´m talking about:

Code:
def get_cover_url(self):
        soup = self.index_to_soup('http://elpais.com/')
        for image in soup.findAll('img'):
           if image['src'].endswith('elpaisTodayMiddle.jpg'):
              sstr = image['src']
              return sstr.replace('elpaisTodayMiddle.jpg', 'elpaisToday.jpg')
        return None

Last edited by juandp77; 12-03-2012 at 01:32 PM.
juandp77 is offline   Reply With Quote