View Single Post
Old 02-28-2012, 10:11 PM   #7
adoucette
Member
adoucette doesn't litteradoucette doesn't litter
 
Posts: 24
Karma: 140
Join Date: Sep 2011
Device: Nook Color (rooted?)
That fixes the syntax error, thanks. But it does not download a cover... I still get the default Calibre cover.
Code:
    def get_cover_url(self):
        cover_url = None
        soup = self.index_to_soup('http://www.abc.com')
        cov = soup.find('img', src=re.compile(r'\w*?cover\w{1,22}\.jpg'))
        if cov is not None:
            self.cover_url = cov['src']
Any thoughts on that? I've tried it with the full url also, as
Code:
cov = soup.find('img', src=re.compile(r'http\S+?cover\w{1,22}\.jpg'))
and still get the same effect

Last edited by adoucette; 02-29-2012 at 07:17 AM.
adoucette is offline   Reply With Quote