diff --git a/recipes/bash_org_pl.recipe b/recipes/bash_org_pl.recipe deleted file mode 100644 index 9e48d5a22f..0000000000 --- a/recipes/bash_org_pl.recipe +++ /dev/null @@ -1,51 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe - - -class Bash_org_pl(BasicNewsRecipe): - title = u'Bash.org.pl' - __author__ = 'fenuks' - description = 'Bash.org.pl - zabawne cytaty z IRC' - category = 'funny quotations, humour' - language = 'pl' - cover_url = u'http://userlogos.org/files/logos/dzikiosiol/none_0.png' - max_articles_per_feed = 50 - no_stylesheets = True - keep_only_tags = [dict(name='a', attrs={'class': 'qid click'}), - dict(name='div', attrs={'class': 'quote post-content post-body'})] - - def latest_articles(self): - articles = [] - soup = self.index_to_soup(u'http://bash.org.pl/latest/') - tags = soup.findAll('a', attrs={'class': 'qid click'}) - for a in tags: - title = a.string - url = 'http://bash.org.pl' + a['href'] - articles.append({'title': title, - 'url': url, - 'date': '', - 'description': '' - }) - return articles - - def random_articles(self): - articles = [] - for i in range(self.max_articles_per_feed): - soup = self.index_to_soup(u'http://bash.org.pl/random/') - url = soup.find('a', attrs={'class': 'qid click'}) - title = '' - url = 'http://bash.org.pl/random/' - articles.append({'title': title, - 'url': url, - 'date': '', - 'description': '' - }) - return articles - - def populate_article_metadata(self, article, soup, first): - article.title = soup.find(attrs={'class': 'qid click'}).string - - def parse_index(self): - feeds = [] - feeds.append((u"Najnowsze", self.latest_articles())) - feeds.append((u"Losowe", self.random_articles())) - return feeds diff --git a/recipes/conowego_pl.recipe b/recipes/conowego_pl.recipe deleted file mode 100644 index 4dbae4b104..0000000000 --- a/recipes/conowego_pl.recipe +++ /dev/null @@ -1,56 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.ebooks.BeautifulSoup import BeautifulSoup, Comment - - -class CoNowegoPl(BasicNewsRecipe): - title = u'conowego.pl' - __author__ = 'fenuks' - description = u'Nowy wortal technologiczny oraz gazeta internetowa. Testy najnowszych produktów, fachowe porady i recenzje. U nas znajdziesz wszystko o elektronice użytkowej !' # noqa - category = 'IT, news' - language = 'pl' - oldest_article = 7 - max_articles_per_feed = 100 - INDEX = 'http://www.conowego.pl/' - extra_css = '.news-single-img {float:left; margin-right:5px;}' - no_stylesheets = True - remove_empty_feeds = True - use_embedded_content = False - ignore_duplicate_articles = {'title', 'url'} - keep_only_tags = [ - dict(name='div', attrs={'class': 'news_list single_view'})] - remove_tags = [ - dict(name='div', attrs={'class': ['ni_bottom', 'ni_rank', 'ni_date']})] - feeds = [(u'Aktualno\u015bci', u'http://www.conowego.pl/rss/aktualnosci-5/?type=100'), (u'Gaming', u'http://www.conowego.pl/rss/gaming-6/?type=100'), - (u'Porady', u'http://www.conowego.pl/rss/porady-3/?type=100'), (u'Testy', u'http://www.conowego.pl/rss/testy-2/?type=100')] - - def preprocess_html(self, soup): - for i in soup.findAll('img'): - i.parent.insert(0, BeautifulSoup('
')) - i.insert(len(i), BeautifulSoup('
')) - self.append_page(soup, soup.body) - return soup - - def append_page(self, soup, appendtag): - tag = appendtag.find('div', attrs={'class': 'pages'}) - if tag: - nexturls = tag.findAll('a') - for nexturl in nexturls[:-1]: - soup2 = self.index_to_soup( - 'http://www.conowego.pl/' + nexturl['href']) - pagetext = soup2.find(attrs={'class': 'ni_content'}) - pos = len(appendtag.contents) - appendtag.insert(pos, pagetext) - - comments = appendtag.findAll( - text=lambda text: isinstance(text, Comment)) - for comment in comments: - comment.extract() - for r in appendtag.findAll(attrs={'class': ['pages', 'paginationWrap']}): - r.extract() - - def get_cover_url(self): - soup = self.index_to_soup('http://www.conowego.pl/magazyn/') - tag = soup.find(attrs={'class': 'ms_left'}) - if tag: - self.cover_url = self.INDEX + tag.find('img')['src'] - return getattr(self, 'cover_url', self.cover_url) diff --git a/recipes/czas_gentlemanow.recipe b/recipes/czas_gentlemanow.recipe index aeaa9d0312..672e2f77e1 100644 --- a/recipes/czas_gentlemanow.recipe +++ b/recipes/czas_gentlemanow.recipe @@ -9,7 +9,7 @@ class CzasGentlemanow(BasicNewsRecipe): description = u'Historia mężczyzn z dala od wielkiej polityki' category = 'blog' language = 'pl' - cover_url = 'http://czasgentlemanow.pl/wp-content/uploads/2012/10/logo-Czas-Gentlemanow1.jpg' + cover_url = 'https://czasgentlemanow.pl/wp-content/uploads/2012/10/logo-Czas-Gentlemanow1.jpg' ignore_duplicate_articles = {'title', 'url'} oldest_article = 7 max_articles_per_feed = 100 @@ -17,18 +17,10 @@ class CzasGentlemanow(BasicNewsRecipe): .wp-caption-text {text-align: left;} img.aligncenter {display: block; margin-left: auto; margin-right: auto;} .alignleft {float: left; margin-right:5px;}' no_stylesheets = True remove_empty_feeds = True - preprocess_regexps = [ - (re.compile(u'

Może Cię też zainteresować:

'), lambda m: '')] use_embedded_content = False - keep_only_tags = [dict(name='div', attrs={'class': 'content'})] - remove_tags = [dict(attrs={'class': 'meta_comments'}), dict( - id=['comments', 'related_posts_thumbnails', 'respond'])] - remove_tags_after = dict(id='comments') + keep_only_tags = [dict(name='div', attrs={'class': 'post-wrapper'})] + remove_tags = [dict(attrs={'class': ['awac-wrapper', 'post-bottom', 'comment', 'seperate']})] feeds = [ - (u'M\u0119ski \u015awiat', u'http://czasgentlemanow.pl/category/meski-swiat/feed/'), - (u'Styl', u'http://czasgentlemanow.pl/category/styl/feed/'), - (u'Vademecum Gentlemana', u'http://czasgentlemanow.pl/category/vademecum/feed/'), - - (u'Dom i rodzina', u'http://czasgentlemanow.pl/category/dom-i-rodzina/feed/'), - (u'Honor', u'http://czasgentlemanow.pl/category/honor/feed/'), - (u'Gad\u017cety Gentlemana', u'http://czasgentlemanow.pl/category/gadzety-gentlemana/feed/')] + (u'Charakter', u'https://czasgentlemanow.pl/category/charakter/feed/'), + (u'Wizerunek', u'https://czasgentlemanow.pl/category/wizerunek/feed/'), + (u'Relacje międzyludzkie', u'https://czasgentlemanow.pl/category/relacje-miedzyludzkie/feed/')] diff --git a/recipes/icons/bash_org_pl.png b/recipes/icons/bash_org_pl.png deleted file mode 100644 index 70b31ddc04..0000000000 Binary files a/recipes/icons/bash_org_pl.png and /dev/null differ diff --git a/recipes/icons/conowego_pl.png b/recipes/icons/conowego_pl.png deleted file mode 100644 index bdc772e02f..0000000000 Binary files a/recipes/icons/conowego_pl.png and /dev/null differ diff --git a/recipes/icons/samcik_blox.png b/recipes/icons/samcik_blox.png deleted file mode 100644 index 31b5ac2aaf..0000000000 Binary files a/recipes/icons/samcik_blox.png and /dev/null differ diff --git a/recipes/myapple_pl.recipe b/recipes/myapple_pl.recipe index 4850591b25..8e28e8ff89 100644 --- a/recipes/myapple_pl.recipe +++ b/recipes/myapple_pl.recipe @@ -6,7 +6,6 @@ class MyAppleRecipe(BasicNewsRecipe): __license__ = 'GPL v3' __author__ = u'Artur Stachecki ' language = 'pl' - version = 1 title = u'MyApple.pl' category = u'News' @@ -22,16 +21,10 @@ class MyAppleRecipe(BasicNewsRecipe): remove_javascript = True simultaneous_downloads = 3 - keep_only_tags = [] - keep_only_tags.append(dict(name='div', attrs={'id': 'article_content'})) + keep_only_tags = [dict(name='article')] - remove_tags = [] - remove_tags.append( - dict(name='div', attrs={'class': 'article_author_date_comment_container'})) - remove_tags.append(dict(name='div', attrs={'class': 'fullwidth'})) - remove_tags.append(dict(name='div', attrs={'class': 'cmslinks'})) - remove_tags.append(dict(name='div', attrs={'class': 'googleads-468'})) - remove_tags.append(dict(name='div', attrs={'id': 'comments'})) + remove_tags = [dict(name='a', attrs={'class': 'twitter-follow-button'}), + dict(name='ul', attrs={'class': 'list-inline text-muted small mb-0 mt-1'})] extra_css = ''' body {font-family: verdana, arial, helvetica, geneva, sans-serif ;} @@ -39,7 +32,7 @@ class MyAppleRecipe(BasicNewsRecipe): ''' feeds = [ - ('News', 'feed://myapple.pl/external.php?do=rss&type=newcontent§ionid=1&days=120&count=10'), + ('Wpisy', 'https://myapple.pl/posts.atom'), ] def preprocess_html(self, soup): diff --git a/recipes/samcik_blox.recipe b/recipes/samcik_blox.recipe deleted file mode 100644 index 8b1c122b5f..0000000000 --- a/recipes/samcik_blox.recipe +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python2 - -__license__ = 'GPL v3' -__author__ = 'teepel ' - -''' -samcik.blox.pl -''' - -from calibre.web.feeds.news import BasicNewsRecipe - - -class samcik(BasicNewsRecipe): - title = u'Maciej Samcik Blog' - __author__ = 'teepel ' - language = 'pl' - description = u'Blog Macieja Samcika, długoletniego dziennikarza ekonomicznego Gazety Wyborczej . O finansach małych i dużych. Mnóstwo ciekawostek na temat pieniędzy.' # noqa - oldest_article = 7 - max_articles_per_feed = 100 - remove_javascript = True - no_stylesheets = True - simultaneous_downloads = 3 - - remove_tags = [] - remove_tags.append(dict(name='table', attrs={'border': '0'})) - - feeds = [(u'Wpisy', u'http://samcik.blox.pl/rss2')]