From cb45c68c31e38d779d5d085d08d3adf8e8febb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sat, 17 Oct 2015 21:26:56 +0200 Subject: [PATCH 1/4] there is something else under this domain now... --- recipes/bachormagazyn.recipe | 43 -------------------------------- recipes/icons/bachormagazyn.png | Bin 620 -> 0 bytes 2 files changed, 43 deletions(-) delete mode 100644 recipes/bachormagazyn.recipe delete mode 100644 recipes/icons/bachormagazyn.png diff --git a/recipes/bachormagazyn.recipe b/recipes/bachormagazyn.recipe deleted file mode 100644 index 26993165f1..0000000000 --- a/recipes/bachormagazyn.recipe +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- - -__license__ = 'GPL v3' -__copyright__ = u'Łukasz Grąbczewski 2013' -__version__ = '1.0' - -''' -bachormagazyn.pl -''' - -from calibre.web.feeds.news import BasicNewsRecipe - -class bachormagazyn(BasicNewsRecipe): - __author__ = u'Łukasz Grączewski' - title = u'Bachor Magazyn' - description = u'Alternatywny magazyn o alternatywach rodzicielstwa' - language = 'pl' - publisher = 'Bachor Mag.' - publication_type = 'magazine' - masthead_url = 'http://bachormagazyn.pl/wp-content/uploads/2011/10/bachor_header1.gif' - no_stylesheets = True - remove_javascript = True - use_embedded_content = False - remove_empty_feeds = True - - oldest_article = 32 #monthly +1 - max_articles_per_feed = 100 - - feeds = [ - (u'Bezradnik dla nieudacznych rodziców', u'http://bachormagazyn.pl/feed/') - ] - - keep_only_tags = [] - keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'content'})) - - remove_tags = [] - remove_tags.append(dict(attrs = {'id' : 'nav-above'})) - remove_tags.append(dict(attrs = {'id' : 'nav-below'})) - remove_tags.append(dict(attrs = {'id' : 'comments'})) - remove_tags.append(dict(attrs = {'class' : 'entry-info'})) - remove_tags.append(dict(attrs = {'class' : 'comments-link'})) - remove_tags.append(dict(attrs = {'class' : 'sharedaddy sd-sharing-enabled'})) diff --git a/recipes/icons/bachormagazyn.png b/recipes/icons/bachormagazyn.png deleted file mode 100644 index cc4a183822a54961b1ce34057b5e26a61f08d1f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 620 zcmV-y0+aoTP)z0v|S-oZ@(4J3UK1Rnz0o6Tv^6>l5Zx=3}lai5yhImC~`F}9DeC5*8k7YZ(O%^ z`<9olUVi`nZRhSCK-t-IW(tW2fo))7VCQ55#t|@}>Kp6-{P~lZoWR7w1Prw8JGMQ0 z{!B?liGz!si-!vuArOD?^77^tS4QCe0CX#4Y*&u-tn6%rP#tFLqR{F&PNT5(BnR(2M6DCJ$gddbMd5Ge8Z z>7&&26ri-Ky6Wn+D=%KYpl6`l*xYdL!dXda38<$%ygWL)I`{?ofsCosr&w5800r6E z*|T%9fa1WU;p^|y(bX;}ECBU1(2GDH!x=yl$i@_h Date: Sat, 17 Oct 2015 21:31:23 +0200 Subject: [PATCH 2/4] nexto doesn't run a blog any more --- recipes/blognexto.recipe | 28 ---------------------------- recipes/icons/blognexto.png | Bin 533 -> 0 bytes 2 files changed, 28 deletions(-) delete mode 100644 recipes/blognexto.recipe delete mode 100644 recipes/icons/blognexto.png diff --git a/recipes/blognexto.recipe b/recipes/blognexto.recipe deleted file mode 100644 index b5ced2cf50..0000000000 --- a/recipes/blognexto.recipe +++ /dev/null @@ -1,28 +0,0 @@ -from calibre.web.feeds.news import BasicNewsRecipe - -class blognexto(BasicNewsRecipe): - title = 'BLOG.NEXTO.pl' - __author__ = 'MrStefan ' - language = 'pl' - description ='o e-publikacjach prawie wszystko' - masthead_url='http://blog.nexto.pl/wp-content/uploads/2012/04/logo-blog-nexto.pl_.jpg' - remove_empty_feeds= True - oldest_article = 7 - max_articles_per_feed = 100 - remove_javascript=True - no_stylesheets=True - - - keep_only_tags =[] - keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'content'})) - - remove_tags =[] - remove_tags.append(dict(name = 'div', attrs = {'class' : 'comment-cloud'})) - remove_tags.append(dict(name = 'p', attrs = {'class' : 'post-date1'})) - remove_tags.append(dict(name = 'div', attrs = {'class' : 'fb-like'})) - remove_tags.append(dict(name = 'div', attrs = {'class' : 'tags'})) - remove_tags.append(dict(name = 'div', attrs = {'class' : 'postnavi'})) - remove_tags.append(dict(name = 'div', attrs = {'class' : 'commments-box'})) - remove_tags.append(dict(name = 'div', attrs = {'id' : 'respond'})) - - feeds = [('Artykuly', 'http://feeds.feedburner.com/blognexto')] diff --git a/recipes/icons/blognexto.png b/recipes/icons/blognexto.png deleted file mode 100644 index e325947127e9df7ec19c08888cd067fcf2dd0d69..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 533 zcmV+w0_y#VP)6vpqLGU^Nr12c>u?$n*4R;hv_B8qlZ#a98{s1!s6Ulh=dA|R@$Ai7aNR8a-g zN)f4wC@Lmxk|t@JkTgm2(1VF3tr`w+zwrI;{m$W_*Yr;pcsY2UINODS1IP?R8X#Z$ z$#zG$E*G!<0|f`Nt(0G#(qi;Cz|BRd<}X(EBdscOB0aSlO?&|uiWK$rSibTsqPc+b zRGY<4cr-fv4j8%=I5s}AY79wrR)U*sElEDz>U(xbz zNxs~(qaAYK$a+>1amrW(Uop2b$n@GbA(Q*5mA_ zT`~;m;xJU7XWxj_=(vT+Ou%I1pr7t*4AuR&10Z1%UjbIognV_%uS}WQU{689PrK(0 Xdht>}Oo_)I00000NkvXXu0mjfcb@ey From fd2adb03ef85d39b0e089f36f85bc698bd09f3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sat, 17 Oct 2015 22:16:37 +0200 Subject: [PATCH 3/4] remove some garbage tags --- recipes/ciekawostki_historyczne.recipe | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/ciekawostki_historyczne.recipe b/recipes/ciekawostki_historyczne.recipe index 42ea94fa1d..fe04db98fa 100644 --- a/recipes/ciekawostki_historyczne.recipe +++ b/recipes/ciekawostki_historyczne.recipe @@ -4,7 +4,7 @@ import re class Ciekawostki_Historyczne(BasicNewsRecipe): title = u'Ciekawostki Historyczne' oldest_article = 7 - __author__ = 'fenuks' + __author__ = u'fenuks & Tomasz Długosz' description = u'Serwis popularnonaukowy - odkrycia, kontrowersje, historia, ciekawostki, badania, ciekawostki z przeszłości.' category = 'history' language = 'pl' @@ -18,7 +18,7 @@ class Ciekawostki_Historyczne(BasicNewsRecipe): remove_empty_feeds = True keep_only_tags = [dict(name='div', attrs={'class':'post'})] recursions = 5 - remove_tags = [dict(id='singlepostinfo')] + remove_tags = [dict(id='singlepostinfo'), dict(attrs={'class':['books short floatRight','unprintable','booksTable','bawmrp']})] feeds = [(u'Staro\u017cytno\u015b\u0107', u'http://ciekawostkihistoryczne.pl/tag/starozytnosc/feed/'), (u'\u015aredniowiecze', u'http://ciekawostkihistoryczne.pl/tag/sredniowiecze/feed/'), (u'Nowo\u017cytno\u015b\u0107', u'http://ciekawostkihistoryczne.pl/tag/nowozytnosc/feed/'), (u'XIX wiek', u'http://ciekawostkihistoryczne.pl/tag/xix-wiek/feed/'), (u'1914-1939', u'http://ciekawostkihistoryczne.pl/tag/1914-1939/feed/'), (u'1939-1945', u'http://ciekawostkihistoryczne.pl/tag/1939-1945/feed/'), (u'Powojnie (od 1945)', u'http://ciekawostkihistoryczne.pl/tag/powojnie/feed/'), (u'Recenzje', u'http://ciekawostkihistoryczne.pl/category/recenzje/feed/')] @@ -35,4 +35,3 @@ class Ciekawostki_Historyczne(BasicNewsRecipe): soup.find('h6').nextSibling.extract() return soup - From 05c9ab6683fd8ea81bbe6512aa98799beba312e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sat, 17 Oct 2015 22:47:43 +0200 Subject: [PATCH 4/4] this feed is no more --- recipes/icons/magazyn_consido.png | Bin 636 -> 0 bytes recipes/magazyn_consido.recipe | 88 ------------------------------ 2 files changed, 88 deletions(-) delete mode 100644 recipes/icons/magazyn_consido.png delete mode 100644 recipes/magazyn_consido.recipe diff --git a/recipes/icons/magazyn_consido.png b/recipes/icons/magazyn_consido.png deleted file mode 100644 index 1915e79a2a40c903eed6a8387020978d869383f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 636 zcmV-?0)zdDP)mN*pUM2eDxP*X`DCp#r_CTkQ+f1u87v*$Wo2sZZnkzN9fW!?A?nNNQLb>|; zde0sUi+hxiQC9u+{@kVd(497vxsd|jSXWSRAWJm&%K5JSyBsi&ZZMf3(tbaD`f<;J zrms_u!c2kEw93W9w>$Rl5(>JjG@B|sj|EL0XRYsBczH0>ABqX!gjxo6wy$61a%OmY z_;_~fUS9pF#-`Ry{XLgXt0+DlJkrc2KpbOtrfk8>k=ZMk!|ch{?Q`zG0GxzmktlmQ zr@nokRWF;Qx{+_tS#59LP*CwN}Wy^ftgEs0mOj6&tJJI zfk(LjK+y<-62RObATdC20FaxQ2owV;f+FYw2?hrU0Oknw_a6Y5t8w*;Oac&%1VIlH z1W+JM0$?I4leOyTIAL?QZI1n`bGUh8k|5CXmKoDPq(>M9Gol%3_2M-*i_)6mJL$gN z^|ppd{QDb{VoU$h(UFduga6VbSm|_*VIFAH$a|mMZC$rkDufUUqBe<^7H>@4%20&Q zgIE6?Jqe~9N4FRpF-ww;>lZrr?hqi9?uh|35&ZS|*~Gx1bmEIC@HOYBk`s}hxpQOR zvQsC*qE4j&5mu{yJaeNyG}IVKuK><5&NInLNCr7#220x8y;5PBm%k?)1Ott50Kk6$ W8AQkM7jp>!0000ob diff --git a/recipes/magazyn_consido.recipe b/recipes/magazyn_consido.recipe deleted file mode 100644 index 999999518d..0000000000 --- a/recipes/magazyn_consido.recipe +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python2 - -__license__ = 'GPL v3' - -''' -magazynconsido.pl/ -''' - -from calibre.web.feeds.news import BasicNewsRecipe -from calibre.utils.magick import Image - -class magazynconsido(BasicNewsRecipe): - title = u'Magazyn Consido' - __author__ = 'Artur Stachecki ,teepel ' - language = 'pl' - description =u'Portal dla architektów i projektantów' - masthead_url='http://qualitypixels.pl/wp-content/themes/airlock/advance/inc/timthumb.php?src=http://qualitypixels.pl/wp-content/uploads/2012/01/logotyp-magazynconsido-11.png&w=455&zc=1' - oldest_article = 7 - max_articles_per_feed = 100 - remove_javascript=True - no_stylesheets = True - use_embedded_content = False - - keep_only_tags =[] - keep_only_tags.append(dict(name = 'h1')) - keep_only_tags.append(dict(name = 'p')) - keep_only_tags.append(dict(attrs = {'class' : 'navigation'})) - remove_tags =[dict(attrs = {'style' : 'font-size: x-small;' })] - - remove_tags_after =[dict(attrs = {'class' : 'navigation' })] - - extra_css=''' img {max-width:30%; max-height:30%; display: block; margin-left: auto; margin-right: auto;} - h1 {text-align: center;}''' - - def parse_index(self): #(kk) - soup = self.index_to_soup('http://feeds.feedburner.com/magazynconsido?format=xml') - feeds = [] - articles = {} - sections = [] - section = '' - - for item in soup.findAll('item') : - section = self.tag_to_string(item.category) - if not articles.has_key(section) : - sections.append(section) - articles[section] = [] - article_url = self.tag_to_string(item.guid) - article_title = self.tag_to_string(item.title) - article_date = self.tag_to_string(item.pubDate) - article_description = self.tag_to_string(item.description) - articles[section].append( { 'title' : article_title, 'url' : article_url, 'date' : article_date, 'description' : article_description }) - - for section in sections : - if section == 'Video': - feeds.append((section, articles[section])) - feeds.pop() - else: - feeds.append((section, articles[section])) - return feeds - - def append_page(self, soup, appendtag): - apage = soup.find('div', attrs={'class':'wp-pagenavi'}) - if apage is not None: - nexturl = soup.find('a', attrs={'class':'nextpostslink'}) - soup2 = self.index_to_soup(nexturl['href']) - pagetext = soup2.findAll('p') - for tag in pagetext: - pos = len(appendtag.contents) - appendtag.insert(pos, tag) - - while appendtag.find('div', attrs={'class': ['height: 35px;', 'post-meta', 'addthis_toolbox addthis_default_style addthis_', 'post-meta-bottom', 'block_recently_post', 'fbcomments', 'pin-it-button', 'pages', 'navigation']}) is not None: - appendtag.find('div', attrs={'class': ['height: 35px;', 'post-meta', 'addthis_toolbox addthis_default_style addthis_', 'post-meta-bottom', 'block_recently_post', 'fbcomments', 'pin-it-button', 'pages', 'navigation']}).replaceWith('') - - def preprocess_html(self, soup): #(kk) - self.append_page(soup, soup.body) - return self.adeify_images(soup) - - def postprocess_html(self, soup, first): - #process all the images - for tag in soup.findAll(lambda tag: tag.name.lower()=='img' and tag.has_key('src')): - iurl = tag['src'] - img = Image() - img.open(iurl) - if img < 0: - raise RuntimeError('Out of memory') - img.type = "GrayscaleType" - img.save(iurl) - return soup