From c14121fb9af334d6ec48668a38d6190be30c4d14 Mon Sep 17 00:00:00 2001 From: Jony <23194385+jony0008@users.noreply.github.com> Date: Sun, 15 Mar 2020 14:30:06 +0100 Subject: [PATCH 1/3] Delete dani.recipe --- recipes/dani.recipe | 80 --------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 recipes/dani.recipe diff --git a/recipes/dani.recipe b/recipes/dani.recipe deleted file mode 100644 index ca24ae4291..0000000000 --- a/recipes/dani.recipe +++ /dev/null @@ -1,80 +0,0 @@ - -__license__ = 'GPL v3' -__copyright__ = '2010, Darko Miletic ' -''' -bhdani.com -''' - -import re -from calibre import strftime -from calibre.web.feeds.news import BasicNewsRecipe - - -class BHDani(BasicNewsRecipe): - title = 'Dani' - __author__ = 'Darko Miletic' - description = 'On line izdanje najutjecajnijeg bosanskohercegovackog magazina' - publisher = 'd.o.o. CIVITAS' - category = 'dani, bh, bhdani, magazin, sarajevo, bosna, novine, mediji, listovi, news, magazines, weekly' - no_stylesheets = True - oldest_article = 15 - encoding = 'cp1250' - needs_subscription = True - remove_empty_feeds = True - PREFIX = 'http://bhdani.com' - INDEX = PREFIX + '/' - LOGIN = PREFIX + '/users/login.asp' - use_embedded_content = False - language = 'bs' - publication_type = 'magazine' - extra_css = ' @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: Arial, sans1, sans-serif} .article_description{font-family: Arial, sans1, sans-serif} .plv18{font-size: xx-large; font-weight: bold; color: #5261A9} .crn10{font-weight: bold} ' # noqa - - conversion_options = { - 'comment': description, 'tags': category, 'publisher': publisher, 'language': language, 'linearize_tables': True - } - - preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')] - remove_attributes = ['height', 'width', 'align'] - - def get_browser(self): - br = BasicNewsRecipe.get_browser(self) - if self.username is not None and self.password is not None: - br.open(self.INDEX) - br.select_form(name='form') - br['username'] = self.username - br['password'] = self.password - br.submit() - return br - - remove_tags = [dict(name=['link', 'embed', 'object', 'iframe', 'form'])] - remove_tags_before = dict(name='div', attrs={'class': 'crn10'}) - - def get_cover_url(self): - cover_url = None - soup = self.index_to_soup(self.INDEX) - link_item = soup.find('img', attrs={'alt': 'Naslovna strana'}) - if link_item: - cover_url = self.PREFIX + \ - link_item['src'].replace( - '&slika=slika120&', '&slika=slika400&') - return cover_url - - def print_version(self, url): - return url.replace('/default.asp?', '/print.asp?') - - def parse_index(self): - articles = [] - soup = self.index_to_soup(self.PREFIX) - nrtit = soup.find('font', attrs={'class': 'broj'}) - nrtitle = 'Dani' - if nrtit: - nrtitle += ' ' + self.tag_to_string(nrtit) - for item in soup.findAll('a', attrs={'class': ['naslov12', 'menilink2']}): - url = self.PREFIX + item['href'] - title = self.tag_to_string(item) - description = '' - date = strftime(self.timefmt) - articles.append({ - 'title': title, 'date': date, 'url': url, 'description': description - }) - return [(nrtitle, articles)] From 9077f5c8fb29ae108e79bc0562ba37e98d8c209a Mon Sep 17 00:00:00 2001 From: Jony <23194385+jony0008@users.noreply.github.com> Date: Sun, 15 Mar 2020 14:31:10 +0100 Subject: [PATCH 2/3] Delete mobile_bulgaria.recipe --- recipes/mobile_bulgaria.recipe | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 recipes/mobile_bulgaria.recipe diff --git a/recipes/mobile_bulgaria.recipe b/recipes/mobile_bulgaria.recipe deleted file mode 100644 index 4c968f5e2b..0000000000 --- a/recipes/mobile_bulgaria.recipe +++ /dev/null @@ -1,28 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe - - -class AdvancedUserRecipe1329123365(BasicNewsRecipe): - title = u'Mobilebulgaria.com' - __author__ = 'M3 Web' - description = 'The biggest Bulgarian site covering mobile consumer electronics. Offers detailed reviews, popular discussion forum, shop and platform for selling new and second hand phones and gadgets.' # noqa - category = 'News, Reviews, Offers, Forum' - oldest_article = 45 - max_articles_per_feed = 10 - language = 'bg' - encoding = 'windows-1251' - no_stylesheets = False - remove_javascript = True - keep_only_tags = [dict(name='div', attrs={'class': 'bigblock'}), - dict(name='div', attrs={'class': 'verybigblock'}), - dict(name='table', attrs={'class': 'obiaviresults'}), - dict(name='div', attrs={'class': 'forumblock'}), - dict(name='div', attrs={'class': 'forumblock_b1'}), - dict(name='div', attrs={'class': 'block2_2colswrap'})] - - feeds = [(u'News', u'http://www.mobilebulgaria.com/rss_full.php'), - (u'Reviews', u'http://www.mobilebulgaria.com/rss_reviews.php'), - (u'Offers', u'http://www.mobilebulgaria.com/obiavi/rss.php'), - (u'Forum', u'http://www.mobilebulgaria.com/rss_forum_last10.php')] - - extra_css = ''' - #gallery1 div{display: block; float: left; margin: 0 10px 10px 0;} ''' From 3642ca8cae99370dc820f5d5c0a4e2c5cf178f3c Mon Sep 17 00:00:00 2001 From: Jony <23194385+jony0008@users.noreply.github.com> Date: Sun, 15 Mar 2020 14:35:13 +0100 Subject: [PATCH 3/3] Delete Ansa.recipe --- recipes/Ansa.recipe | 73 --------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 recipes/Ansa.recipe diff --git a/recipes/Ansa.recipe b/recipes/Ansa.recipe deleted file mode 100644 index b4dccb7106..0000000000 --- a/recipes/Ansa.recipe +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python2 -__license__ = 'GPL v3' -__author__ = 'Gabriele Marini, based on Darko Miletic' -__copyright__ = '2010, Darko Miletic ' -description = 'Italian daily newspaper - 01-05-2010' -''' -http://www.ansa.it/ -''' - -from calibre.web.feeds.news import BasicNewsRecipe - - -class Ansa(BasicNewsRecipe): - __author__ = 'Gabriele Marini' - description = 'Italian News Agency' - - cover_url = 'http://www.ansa.it/web/images/logo_ansa_interna.gif' - title = u'Ansa' - publisher = 'Ansa' - category = 'News, politics, culture, economy, general interest' - - language = 'it' - timefmt = '[%a, %d %b, %Y]' - - oldest_article = 1 - max_articles_per_feed = 10 - use_embedded_content = False - recursion = 10 - - remove_javascript = True - no_stylesheets = True - conversion_options = {'linearize_tables': True} - remove_attributes = ['colspan'] - - keep_only_tags = [dict(name='div', attrs={'class': ['path', 'header-content', 'corpo']}), - ] - - remove_tags = [ - dict(name='div', attrs={'class': 'tools-bar'}), - dict(name='div', attrs={'id': ['rssdiv', 'blocco']}) - ] - - feeds = [ - (u'HomePage', u'http://www.ansa.it/web/ansait_web_rss_homepage.xml'), - (u'Top New', u'http://www.ansa.it/web/notizie/rubriche/topnews/topnews_rss.xml'), - (u'Cronaca', u'http://www.ansa.it/web/notizie/rubriche/cronaca/cronaca_rss.xml'), - (u'Mondo', u'http://www.ansa.it/web/notizie/rubriche/mondo/mondo_rss.xml'), - (u'Economia', u'http://www.ansa.it/web/notizie/rubriche/economia/economia_rss.xml'), - (u'Politica', u'http://www.ansa.it/web/notizie/rubriche/politica/politica_rss.xml'), - (u'Scienze', u'http://www.ansa.it/web/notizie/rubriche/scienza/scienza_rss.xml'), - (u'Cinema', u'http://www.ansa.it/web/notizie/rubriche/cinema/cinema_rss.xml'), - (u'Tecnologia e Internet', - u'http://www.ansa.it/web/notizie/rubriche/tecnologia/tecnologia_rss.xml'), - (u'Spettacolo', u'http://www.ansa.it/web/notizie/rubriche/spettacolo/spettacolo_rss.xml'), - (u'Cultura e Tendenze', - u'http://www.ansa.it/web/notizie/rubriche/cultura/cultura_rss.xml'), - (u'Sport', u'http://www.ansa.it/web/notizie/rubriche/altrisport/altrisport_rss.xml'), - (u'Calcio', u'http://www.ansa.it/web/notizie/rubriche/calcio/calcio_rss.xml'), - (u'Lazio', u'http://www.ansa.it/web/notizie/regioni/lazio/lazio_rss.xml'), - (u'Lombardia', u'http://www.ansa.it/web/notizie/regioni/lombardia/lombardia.shtml'), - (u'Veneto', u'http://www.ansa.it/web/notizie/regioni/veneto/veneto.shtml'), - (u'Campanioa', u'http://www.ansa.it/web/notizie/regioni/campania/campania.shtml'), - (u'Sicilia', u'http://www.ansa.it/web/notizie/regioni/sicilia/sicilia.shtml'), - (u'Toscana', u'http://www.ansa.it/web/notizie/regioni/toscana/toscana.shtml'), - (u'Trentino', u'http://www.ansa.it/web/notizie/regioni/trentino/trentino.shtml') - ] - - extra_css = ''' - .path{font-style: italic; font-size: small} - .header-content h1{font-weight: bold; font-size: xx-large} - .header-content h2{font-weight: bold; font-size: x-large; font-syle: italic} - .content-corpo{font-size: 14px;font-family: Times New Roman;} - '''