From a75db41a22635424030000216fee6a8f3b8c9042 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 29 Feb 2012 19:04:58 +0530 Subject: [PATCH] ... --- recipes/japaa.recipe | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recipes/japaa.recipe b/recipes/japaa.recipe index a90580b29b..93fd3e0cce 100644 --- a/recipes/japaa.recipe +++ b/recipes/japaa.recipe @@ -1,3 +1,4 @@ +import re from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1330393641(BasicNewsRecipe): @@ -7,6 +8,15 @@ class AdvancedUserRecipe1330393641(BasicNewsRecipe): oldest_article = 30 max_articles_per_feed = 100 auto_cleanup = True + + def get_cover_url(self): + cover_url = None + soup = self.index_to_soup('http://www.jaapa.com') + cover_item = soup.find('img', src=re.compile(r'\w*?cover\w{1,22}\.jpg')) + if cover_item: + cover_url = cover_item['src'] + return cover_url + feeds = [ (u'CME Articles', u'http://feeds.feedburner.com/jaapacmearticles'),