From 1317d395927a019f0b1f999e20ced4632a129144 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 4 Jun 2023 11:37:11 +0530 Subject: [PATCH] remove not working recipe --- recipes/prospectmaguk.recipe | 55 ------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 recipes/prospectmaguk.recipe diff --git a/recipes/prospectmaguk.recipe b/recipes/prospectmaguk.recipe deleted file mode 100644 index 550b034b35..0000000000 --- a/recipes/prospectmaguk.recipe +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -__copyright__ = '2008, Kovid Goyal ' - -__license__ = 'GPL v3' - -''' -calibre recipe for prospectmagazine.co.uk (subscription) -''' - -from calibre.web.feeds.recipes import BasicNewsRecipe -from css_selectors import Select - - -class ProspectMagUK(BasicNewsRecipe): - title = u'Prospect Magazine' - description = 'A general-interest publication offering analysis and commentary about politics, news and business.' - __author__ = 'barty, duluoz' - timefmt = ' [%d %B %Y]' - no_stylesheets = True - publication_type = 'magazine' - category = 'news, UK' - language = 'en_GB' - max_articles_per_feed = 100 - needs_subscription = True - - INDEX = 'http://www.prospectmagazine.co.uk/issue/' - keep_only_tags = [dict(id='post_content')] - - def get_browser(self): - br = BasicNewsRecipe.get_browser(self) - if self.username is not None and self.password is not None: - br.open('http://www.prospectmagazine.co.uk/wp-login.php') - br.select_form(name='loginform') - br['log'] = self.username - br['pwd'] = self.password - br.submit() - return br - - def parse_index(self): - root = self.index_to_soup(self.INDEX, as_tree=True) - sel = Select(root) - for img in sel('.block_this_month .img_wrap img'): - self.cover_url = img.get('src').partition('?')[0] - feeds = [] - for h2 in sel('h2.block-title'): - current_section = self.tag_to_string(h2) - articles = [] - self.log('Found section:', current_section) - for div in sel('div.block_home_post', h2.getparent()): - for a in sel('div.title a[href]', div): - articles.append({'title':self.tag_to_string(a), 'url':a.get('href')}) - self.log('\tFound article:', articles[-1]['title']) - if articles: - feeds.append((current_section, articles)) - return feeds