From 4519ff1db14e78d3e16ea6b642b94c309df87341 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Mar 2013 23:31:56 +0530 Subject: [PATCH] The Friday Times by Krittika Goyal --- recipes/the_friday_times.recipe | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes/the_friday_times.recipe diff --git a/recipes/the_friday_times.recipe b/recipes/the_friday_times.recipe new file mode 100644 index 0000000000..c2f640268b --- /dev/null +++ b/recipes/the_friday_times.recipe @@ -0,0 +1,26 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class TheFridayTimes(BasicNewsRecipe): + title = u'The Friday Times' + language = 'en' + __author__ = 'Krittika Goyal' + + + no_stylesheets = True + no_javascript = True + auto_cleanup = True + + + def parse_index(self): + toc = self.index_to_soup('http://www.thefridaytimes.com/beta3/tft/index.php') + articles = [] + for story in toc.findAll('a', attrs={'class':'homemainlinks'}): + title = self.tag_to_string(story) + url = 'http://www.thefridaytimes.com/beta3/tft/' + story['href'] + self.log('Found article:', story) + self.log('\t', url) + articles.append({'title':title, 'url':url, 'date':'', + 'description':''}) + + return [('Current Issue', articles)] +