View Single Post
Old 02-28-2012, 08:27 AM   #3
adoucette
Member
adoucette doesn't litteradoucette doesn't litter
 
Posts: 24
Karma: 140
Join Date: Sep 2011
Device: Nook Color (rooted?)
Thanks for the reply Kovid - you have a great product and I've certainly donated.
The regexp works properly, but I get a syntax error when I try to add/update the recipe in Calibre. Here's the syntax I'm using:
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 is not None:
            self.cover_url = cov['src']
and the error I get is
Code:
calibre, version 0.8.41
ERROR: Invalid input: <p>Could not create recipe. Error:<br>invalid syntax (<string>, line 13)

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