From 04d5823308e79b8013d54c078a48f8fe0de8c1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 9 Oct 2018 01:21:09 +0200 Subject: [PATCH] remove recipes for no content or missing webpage --- recipes/dzial_zagraniczny.recipe | 28 ------- recipes/homopedia_pl.recipe | 32 -------- recipes/icons/dzial_zagraniczny.png | Bin 438 -> 0 bytes recipes/icons/homopedia_pl.png | Bin 314 -> 0 bytes recipes/odkrywcy_pl.recipe | 111 ---------------------------- recipes/rybinski.recipe | 29 -------- 6 files changed, 200 deletions(-) delete mode 100644 recipes/dzial_zagraniczny.recipe delete mode 100644 recipes/homopedia_pl.recipe delete mode 100644 recipes/icons/dzial_zagraniczny.png delete mode 100644 recipes/icons/homopedia_pl.png delete mode 100644 recipes/odkrywcy_pl.recipe delete mode 100644 recipes/rybinski.recipe diff --git a/recipes/dzial_zagraniczny.recipe b/recipes/dzial_zagraniczny.recipe deleted file mode 100644 index df5d325d15..0000000000 --- a/recipes/dzial_zagraniczny.recipe +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python2 - -__license__ = 'GPL v3' -__author__ = 'teepel ' - -''' -dzialzagraniczny.pl -''' - -from calibre.web.feeds.news import BasicNewsRecipe - - -class dzial_zagraniczny(BasicNewsRecipe): - title = u'Dział Zagraniczny' - __author__ = 'teepel ' - language = 'pl' - description = u'Polskiego czytelnika to nie interesuje' - INDEX = 'http://dzialzagraniczny.pl' - extra_css = 'img {display: block;}' - oldest_article = 7 - cover_url = 'https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/c145.5.160.160/559442_415653975115959_2126205128_n.jpg' - max_articles_per_feed = 100 - remove_empty_feeds = True - remove_javascript = True - no_stylesheets = True - use_embedded_content = True - - feeds = [(u'Dział zagraniczny', u'http://feeds.feedburner.com/dyndns/UOfz')] diff --git a/recipes/homopedia_pl.recipe b/recipes/homopedia_pl.recipe deleted file mode 100644 index 6c1cc74e08..0000000000 --- a/recipes/homopedia_pl.recipe +++ /dev/null @@ -1,32 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe - - -class AdvancedUserRecipe1325420346(BasicNewsRecipe): - title = u'Homopedia' - __author__ = 'rainbowwarrior' - language = 'pl' - oldest_article = 7 - max_articles_per_feed = 100 - publication_type = 'newspaper' - masthead_url = 'http://a5.sphotos.ak.fbcdn.net/hphotos-ak-snc6/67335_168352243178437_166186720061656_594975_5800720_n.jpg' - encoding = 'utf-8' - - def get_cover_url(self): - return 'http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc4/65568_166186970061631_166186720061656_580324_7584264_n.jpg' - - feeds = [ - (u'Nowe has\u0142a', u'http://www.homopedia.pl/w/index.php?title=Specjalna:Nowe_strony&feed=atom&hideliu=&hidepatrolled=&hidebots=&hideredirs=1&limit=50&namespace=0'), # noqa - - (u'Blog', u'http://blog.homopedia.pl/feeds/posts/default')] - - def get_article_url(self, article): - artl = article.get('link', None) - rest, sep, article_id = artl.rpartition('/') - return 'http://www.homopedia.pl/w/index.php?redirect=no&printable=yes&title=' + article_id - - remove_tags = [dict(name='div', attrs={'class': 'noprint'}), dict(name='ul', attrs={'class': 'noprint'}), dict(name='ul', attrs={'id': 'footer-places'}), dict(name='li', attrs={'id': 'footer-info-viewcount'}), dict(name='span', attrs={'class': 'editsection'}), dict(name='div', attrs={'id': 'jump-to-nav'})] # noqa - - remove_tags_before = dict(dict(name='h2', attrs={'class': 'post-title'})) - remove_tags_after = dict(dict(name='a', attrs={'class': 'timestamp-link'})) - - extra_css = 'p{text-indent:1.5em!important;padding:0!important;margin;0!important}' diff --git a/recipes/icons/dzial_zagraniczny.png b/recipes/icons/dzial_zagraniczny.png deleted file mode 100644 index d7ff0cc303d33ee2c1ba875d971da363b46f5bed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 438 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMfmH?j+R~9A~7B&_hE*>5}9uXlC z5it=NDH$0#85t!R6(toFH5DB#9UVO#6C)E7GZPytAhNNsv$1iqadC2SadUC;0+K#H zUOqm4J|RINAz>jQQ6VvLF*#W|Ie9rbMI|LbR8~?`RZ~+})6>^8Wzv)>)27UsH)qMR zC2Ll#S+j1&~5fcb+_Z^5oT1I{`~s$`C`uop!@fFx;TbNNU|P0?ZxaU;BYaz|5~DvN@IhzcwWqp|Melr2f-8oliu5V@|Jg2hu>vGlz|M~UI>iz#N`H4?+ zp8hgw*;+Ys`TQGI`%JqFKJSU|&(#ijmT`Bb=doSIYZnG7MTI6UQrmT(HENz^NP19~ z)b(i@Uw>V6?r~U~uCHvnojY~c!`Qsk34dzopr0EFeWv;Y7A diff --git a/recipes/icons/homopedia_pl.png b/recipes/icons/homopedia_pl.png deleted file mode 100644 index 56a579cad6ec37b7b9da0c03006edb6d089cc764..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmV-A0mc4_P)jrKOzaIisG;g>F;oaCZ705mR3R}d5 zFferQzQ4QAh9ROC9)is#ARo+HvuVXHj8OXU self.oldest_article: - continue - tmp = i.find('a') - title = tmp.string - url = self.INDEX + tmp['href'] - articles.append({'title': title, - 'url': url, - 'date': '', - 'description': '' - }) - return articles - - def parse_index(self): - feeds = [] - feeds.append((u'Człowiek', self.find_articles( - 'http://odkrywcy.pl/kat,111396,name,Czlowiek,kategoria.html'))) - feeds.append((u'Technologie', self.find_articles( - 'http://odkrywcy.pl/kat,111398,name,Technologie,kategoria.html'))) - feeds.append((u'Ekologia', self.find_articles( - 'http://odkrywcy.pl/kat,111400,name,Ekologia,kategoria.html'))) - feeds.append((u'Kosmos', self.find_articles( - 'http://odkrywcy.pl/kat,111402,name,Kosmos,kategoria.html'))) - feeds.append((u'Cywilizacja', self.find_articles( - 'http://odkrywcy.pl/kat,111404,name,Cywilizacja,kategoria.html'))) - feeds.append((u'Przyroda', self.find_articles( - 'http://odkrywcy.pl/kat,111406,name,Przyroda,kategoria.html'))) - feeds.append((u'Fizyka i chemia', self.find_articles( - 'http://odkrywcy.pl/kat,111408,name,Fizyka,kategoria.html'))) - feeds.append((u'Historia', self.find_articles( - 'http://odkrywcy.pl/kat,122994,name,Historia,kategoria.html'))) - feeds.append((u'Media', self.find_articles( - 'http://odkrywcy.pl/kat,116794,name,Media,media.html'))) - - return feeds - - def append_page(self, soup, appendtag): - tag = soup.find('a', attrs={'class': 'btnNext'}) - urls = [] - while tag is not None: - if tag['href'] in urls: - break - urls.append(tag['href']) - soup2 = self.index_to_soup(self.INDEX + tag['href']) - tag = soup2.find(name='a', attrs={'class': 'btnNext'}) - pagetext = soup2.findAll(attrs={'class': 'content'}) - for container in pagetext: - header = container.find(name='h1') - if header: - header.extract() - for comment in container.findAll(text=lambda text: isinstance(text, Comment)): - comment.extract() - for container in pagetext: - pos = len(appendtag.contents) - appendtag.insert(pos, container) - for r in appendtag.findAll(attrs={'class': 'galStr'}): - r.extract() - for r in appendtag.findAll(attrs={'alt': 'Następne'}): - r.extract() - for r in appendtag.findAll(attrs={'alt': 'Poprzednie'}): - r.extract() - for r in appendtag.findAll(attrs={'class': 'clra'}): - r.extract() - for r in appendtag.findAll(attrs={'class': 'close'}): - r.extract() - for r in appendtag.findAll(attrs={'class': 'tagi'}): - r.extract() - for r in appendtag.findAll(attrs={'id': 'moreTopNews'}): - r.extract() - - def preprocess_html(self, soup): - self.append_page(soup, soup.body) - return soup diff --git a/recipes/rybinski.recipe b/recipes/rybinski.recipe deleted file mode 100644 index ce862cb445..0000000000 --- a/recipes/rybinski.recipe +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python2 - -__license__ = 'GPL v3' -__copyright__ = u'2012, Tomasz Dlugosz ' -''' -rybinski.eu -''' - -from calibre.web.feeds.news import BasicNewsRecipe - - -class Rybinski(BasicNewsRecipe): - title = u'Rybinski.eu - economy of the XXI century' - description = u'Blog ekonomiczny dra hab. Krzysztofa Rybi\u0144skiego' - language = 'pl' - __author__ = u'Tomasz D\u0142ugosz' - oldest_article = 7 - max_articles_per_feed = 100 - no_stylesheets = True - - feeds = [(u'wpisy', u'http://www.rybinski.eu/?feed=rss2&lang=pl')] - - keep_only_tags = [dict(name='div', attrs={'class': 'post'})] - - remove_tags = [ - dict(name='div', attrs={'class': 'post-meta-1'}), - dict(name='div', attrs={'class': 'post-meta-2'}), - dict(name='div', attrs={'class': 'post-comments'}) - ]