From 6a785845117b171ffb9c68f0665d50c5adc0833e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 21 Oct 2019 22:23:49 +0200 Subject: [PATCH 1/5] remove conowego recipe - no new content since June --- recipes/conowego_pl.recipe | 56 ---------------------------------- recipes/icons/conowego_pl.png | Bin 481 -> 0 bytes 2 files changed, 56 deletions(-) delete mode 100644 recipes/conowego_pl.recipe delete mode 100644 recipes/icons/conowego_pl.png 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/icons/conowego_pl.png b/recipes/icons/conowego_pl.png deleted file mode 100644 index bdc772e02f9fc67b6e9cba9a1dbd0d78460527f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 481 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMfnE;;QR9*Bw#$rT@#D?TDybXXS1E<7k#xL>|tzkJa?1t2QkuLweWm5cT&74B0m+OJf2 zK)L9kO5s7}!o!M1Ky*X_h>8y@6(3S6KB827R1t{s56Ktql`GjVTYNySh) zp_9)g&%d0#;8Nkz>oaygoWB3jvg6OzpM169?CTBZULCvr?$n)6XYPJHbMMRf2Olmz z{&?xpr<*T-{QUd>-#;J%5`X`L(Eop6Jj<%%7tmi9JY5_^DsHhlbXpyD5cv0eLg3M3 zVYw-j9VhO1FWtNB{eM5ZC1#;B7fJT;TWeU|E0M|UyP~AcGc|R4l31DlGPwvz1>Qj2 zpEn)f*;ub|TxvrRTxy1?e*gI0=Twjh^X1d_SYYN|El|2FLRP`ME?D@s~^_h<`&G* z&iTsZr0HU7%U(Ejhq0KE)?TA0Y1+Ty);~&p%f-kv^{AU`q?*dHZ~R&(M0_ Date: Mon, 21 Oct 2019 22:54:29 +0200 Subject: [PATCH 2/5] =?UTF-8?q?update=20Czas=20Gentleman=C3=B3w=20recipe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes/czas_gentlemanow.recipe | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) 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/')] From ab4a5993071ffec07633bd0aa3cf97e3eeeb502a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 21 Oct 2019 22:58:47 +0200 Subject: [PATCH 3/5] remove recipe for no new content since march --- recipes/bash_org_pl.recipe | 51 ---------------------------------- recipes/icons/bash_org_pl.png | Bin 473 -> 0 bytes 2 files changed, 51 deletions(-) delete mode 100644 recipes/bash_org_pl.recipe delete mode 100644 recipes/icons/bash_org_pl.png 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/icons/bash_org_pl.png b/recipes/icons/bash_org_pl.png deleted file mode 100644 index 70b31ddc0488bb5ab948816561f20d0ebda228c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 473 zcmV;~0Ve*5P)GkTlR3mZnxom{??%OgEJ_RZ1<2)Q{3>GsNq| zVLN--Z|6K`XMxa!2n5n0olXaLVzvgr5~jBHcJ^4><2~4BXfz*yPjVjjll)S8FTH-r zC(%=Kad931eQ-{@)G61xwR*qK$9a+@wcbEe0mL|LrM3$6>U@G<-!w87v&mv!+gK+E z5}^rzb=X7|fXG#HSs^R7B#67>z4yqsir2;gtHUO#fbyfL*P0AT4+_?*pH+V-s9#M?1w4C33SUjT?kF{01>@SEMdG%;b`hYJ1M@2w8ab~p7fwV59LmozllatF{v#n z-9PKGbP^j3W594q^0(aRHyZuAX6ZqEWH=MNJ+d0C)smN=#g+(@37+$pnJb|w2+d+L zb8U6I;Kz?IpPr(27@9RPy9^B@q6`K|c3B1+jWB@8Z3PY18w43>_&BOxb4!909nsA_ P00000NkvXXu0mjfd|uCH From ee89dcaaf9188b1b5585809fbfcf596112f4c4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Mon, 21 Oct 2019 23:05:59 +0200 Subject: [PATCH 4/5] this blog is no more --- recipes/icons/samcik_blox.png | Bin 881 -> 0 bytes recipes/samcik_blox.recipe | 27 --------------------------- 2 files changed, 27 deletions(-) delete mode 100644 recipes/icons/samcik_blox.png delete mode 100644 recipes/samcik_blox.recipe diff --git a/recipes/icons/samcik_blox.png b/recipes/icons/samcik_blox.png deleted file mode 100644 index 31b5ac2aafb86fdb5fc80090d13d5ffe41780f3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 881 zcmV-%1CIQOP)$Bc^E0LaJyzP#lNgbaER2jalaoA^l|Po2K$n+6l$1@8kx-A1Q;m&PjEqQ! zhed{lLV;o)}S;dSKXbm!+{<>gx8 z;a1<@Ro~xE($ZMb(M!(GJjKOGzrRK7>{9snSN!~8|NmnD|6Kq7X8-?Z|Nm(J|7rjK zYXARh|Nm|M{c8XJa`W?NrKO&ootl=GkdcvncXu3mdKYqX8f|S2X=xW_We;It3twLl zUtbniR}xTA9#>Z`S64P*U@l={0AgYQW@Z3rXaIC{0C#r)cz6JOd$lJUiwos4eSRv3jlqpOR(>&egSN+N$je zG=tq@KwSR7`` z@QSw8RAuY>vT}iax5jC{Y Date: Mon, 21 Oct 2019 23:41:14 +0200 Subject: [PATCH 5/5] update myapple.pl recipe --- recipes/myapple_pl.recipe | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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):