From 651aeec5025ec88c9858cc39ae472d88dcedc5f0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 17 Oct 2012 19:49:14 +0530 Subject: [PATCH] Various new Polish recipes --- recipes/forsal.recipe | 23 +++++++++++++++++++++++ recipes/icons/forsal.png | Bin 0 -> 1081 bytes recipes/icons/nowy_ekran.png | Bin 0 -> 660 bytes recipes/icons/puls_biznesu.png | Bin 0 -> 322 bytes recipes/icons/stopklatka.png | Bin 0 -> 450 bytes recipes/nowy_ekran.recipe | 16 ++++++++++++++++ recipes/puls_biznesu.recipe | 31 +++++++++++++++++++++++++++++++ recipes/stopklatka.recipe | 25 +++++++++++++++++++++++++ 8 files changed, 95 insertions(+) create mode 100644 recipes/forsal.recipe create mode 100644 recipes/icons/forsal.png create mode 100644 recipes/icons/nowy_ekran.png create mode 100644 recipes/icons/puls_biznesu.png create mode 100644 recipes/icons/stopklatka.png create mode 100644 recipes/nowy_ekran.recipe create mode 100644 recipes/puls_biznesu.recipe create mode 100644 recipes/stopklatka.recipe diff --git a/recipes/forsal.recipe b/recipes/forsal.recipe new file mode 100644 index 0000000000..4ebbb5a2a8 --- /dev/null +++ b/recipes/forsal.recipe @@ -0,0 +1,23 @@ +from calibre.web.feeds.news import BasicNewsRecipe +import re +class ForsalPL(BasicNewsRecipe): + title = u'Forsal.pl' + __author__ = 'fenuks' + description = u'Na portalu finansowym Forsal.pl znajdziesz najświeższe wiadomości finansowe i analizy. Kliknij i poznaj aktualne kursy walut, notowania giełdowe oraz inne wiadomości ze świata finansów.' + category = 'economy, finance' + language = 'pl' + oldest_article = 7 + max_articles_per_feed = 100 + use_embedded_content = False + ignore_duplicate_articles = {'title', 'url'} + cover_url = 'http://www.bizneswnieruchomosciach.pl/wp-content/uploads/2010/07/logo_forsal.jpg' + no_stylesheets = True + remove_tags = [dict(name='div', attrs={'class':'related'}), dict(name='img', attrs={'title':'Forsal'})] + feeds = [(u'Najnowsze', u'http://forsal.pl/atom/najnowsze'), (u'Tylko na forsal.pl', u'http://forsal.pl/atom/tagi/forsal'), (u'Publicystyka', u'http://forsal.pl/atom/tagi/opinia'), (u'Bloomberg', u'http://forsal.pl/atom/tagi/bloomberg'), (u'Financial Times', u'http://forsal.pl/atom/tagi/financial_times'), (u'Gie\u0142da', u'http://forsal.pl/atom/tagi/gielda'), (u'Waluty', u'http://forsal.pl/atom/tagi/waluty'), (u'Surowce', u'http://forsal.pl/atom/tagi/surowce'), (u'Komenarze finasnowe', u'http://forsal.pl/atom/tagi/komentarz'), (u'Komentarze gie\u0142dowe', u'http://forsal.pl/atom/tagi/komentarz;gielda'), (u'Komentarze walutowe', u'http://forsal.pl/atom/tagi/komentarz;waluty'), (u'Makroekonomia', u'http://forsal.pl/atom/tagi/makroekonomia'), (u'Handel', u'http://forsal.pl/atom/tagi/handel'), (u'Nieruchomo\u015bci', u'http://forsal.pl/atom/tagi/nieruchomosci'), (u'Motoryzacja', u'http://forsal.pl/atom/tagi/motoryzacja'), (u'Finanse', u'http://forsal.pl/atom/tagi/finanse'), (u'Transport', u'http://forsal.pl/atom/tagi/transport'), (u'Media', u'http://forsal.pl/atom/tagi/media'), (u'Telekomunikacja', u'http://forsal.pl/atom/tagi/telekomunikacja'), (u'Energetyka', u'http://forsal.pl/atom/tagi/energetyka'), (u'Przemys\u0142', u'http://forsal.pl/atom/tagi/przemysl'), (u'Moja firma', u'http://forsal.pl/atom/tagi/moja_firma')] + + def print_version(self, url): + url_id = re.search(ur'/[0-9]+,', url) + if url_id: + return 'http://forsal.pl/drukowanie' + url_id.group(0)[:-1] + else: + return url diff --git a/recipes/icons/forsal.png b/recipes/icons/forsal.png new file mode 100644 index 0000000000000000000000000000000000000000..fb1f9044ce87dab2f24023007e9bf0f5034f4817 GIT binary patch literal 1081 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fHRz`&#( z;1l9HRnKg(yWc`L--T{I3tYVyxOi_ZC^t?>?8;O4V0I%T&{*lxdw-M-7(#U3wzSSx% z)8%T0i&XR%I(W=;^;zKLxjiIile5nzSKp0J-UoAwQ+NcIYnv`rH&~>iH%~=(mZH{d zTh|4S9-I8b*4VnPwsTu$<#c7yvMGw16XevUSv$?McU$Kfu+-Fctykca^A|7f-g{;5 zzHT|Sb{XY0!}V>CxyZ$o%Yx1375oN}wIQj?5Qy_9^Hh3z~W zmxWgL(^WL4DXUMGS6&$s(I_onCoNwiC08XSTP7~uW@u1{O9R$QV+QmR5iYKnhAhNxJoh*+|aaE+na3^ThnP3V-6$U1g z3@s+xyL6dbx0_kDm{^`%yDnQ&u1w#!T;I6S%zCP+%^Z8T`K~_mU43V}c+Yn7Tp1bv z|Ns9ZxtX^>=`G3I-DQXGezk8vwxFkrV~E7%H4<0;u^epkg)5qch z55z@;#Kgn|MTMs)But$$Y1+i8!qdV7LW05qLz4rpU$}DVnxNRVtC!6UOpMGD4NQ%< zZ`dLvwr$(St((gWOcD!<$_h)1#n~9M`Tg~U+4AM%DX+?_RQUefj$JyZ?-cvj&-;rmVcYjF~m<%pB9~Z*#KRc7A@QAF+eu z#igU(({v(tt(lehvuo<=u=R|;a^CJLeSJOu#)%D?pT&eHU%2q<)mn#uy}8y5jW#Nf0Ygf)#5JNMC9x#cD!C{XNHG{07#iss8t59DhZtH~nHX4^7;77tS{WE5>pdz% p(U6;;l9^VC&|nr~U|?lxVr6O$(GbR1{Ryan!PC{xWt~$(695Hbh~5AI literal 0 HcmV?d00001 diff --git a/recipes/icons/nowy_ekran.png b/recipes/icons/nowy_ekran.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff4f59074c5772ba13b34289d2319a41baa5179 GIT binary patch literal 660 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5l(-t; z6XFV_IXF1j+1dH|`574*xwyDQMMe4e_=JRnw6wIQOqufk|9>7Hp2dq7|NHmv@87?l zK7A4p5D*g++q!jYYilbjE9;syYj}Bi4Gat>O`5c5(V}0!ezCE!m6w;Bn3xzD8LeKu z`sdG|zkmO>va;gj5m^jjvhU#sHn)y%)DjG7HezkM~@z@Tet4}_wU`^-3u2k z{P5v}uCA_(j7(8ck*%#Q6BE;h4I4y6L>@eNATBPhp`o#F-@ZS8{x~@~WoKu)EdN>{WhD zIrID1zn`hjd;VIl%2U4Da_6YIm$`y&j`@wmsOr7!v*P$yT#r3%#&*NBpo#FA92 zbP0l+XkKQg-u8 literal 0 HcmV?d00001 diff --git a/recipes/icons/puls_biznesu.png b/recipes/icons/puls_biznesu.png new file mode 100644 index 0000000000000000000000000000000000000000..793fdb0a50506504bcae4dbca9ea8900800f08dc GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9Ea{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YhS zC&U#<&tzcu|NsBaEgg|S4r57>UoeBivm0q3PLj8~3sV|*O$v~s@9E+g!f`!0fuZrj zg$n`_8%4ZQbYo3h6|=ES4z)+>ez|hdb!0-zw)bN6Vq11qZ;Z*_ygVhWM2JwP9y8>;15(WW2 zA+G;{;QfpLny0ch3BunD+nR(*NhT{|n~+SLgVzJMdpT|GzAe zRoxtnK)sAf-tI089jvk*K+aT87sn8e>&XcrWre=!3{7JEzP$q43WudTEMue`c-$EI z($m@6R4>QO@#fnglkni?(?=z)4HqXL%)0$1c=jxbEs|E7(x=UOulFErLfl^EsO0aA zW^D6zZNIj4z5E8l4c|qt&WYK&r>*h((LJ-@H#9W9F1X3HICAwfgAG^ZU&WXGxT3}O z?`!?P^MC7oI~<+kYyYnOKhuWc&NEZnt9g%C10ASZ;u=wsl30>zm0Xkxq!^4042^UR z4Rj67LkumgObo0{jI|9+tqcs3^&XX>Xvob^$xN$6XfO*gFt9Q;u`;lLXn3)bwH~N} N!PC{xWt~$(69A^;sDc0h literal 0 HcmV?d00001 diff --git a/recipes/nowy_ekran.recipe b/recipes/nowy_ekran.recipe new file mode 100644 index 0000000000..4862a3a64f --- /dev/null +++ b/recipes/nowy_ekran.recipe @@ -0,0 +1,16 @@ +from calibre.web.feeds.news import BasicNewsRecipe +class NowyEkran(BasicNewsRecipe): + title = u'Nowy ekran' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets= True + __author__ = 'fenuks' + description = u'Niezależny serwis społeczności blogerów' + category = 'blog' + language = 'pl' + masthead_url='http://s.nowyekran.pl/gfx/ekran-big.gif' + cover_url= 'http://s.nowyekran.pl/gfx/ekran-big.gif' + remove_tags_before = dict(name='div', attrs={'class':'post_detal'}) + remove_tags_after = dict(name='div', attrs={'class':'post_footer'}) + remove_tags=[dict(name='span', attrs={'class':'ico ico_comments'}), dict(name='div', attrs={'class':'post_footer'}), dict(name='a', attrs={'class':'getpdf'})] + feeds = [(u'Najnowsze notki', u'http://www.nowyekran.pl/RSS/')] diff --git a/recipes/puls_biznesu.recipe b/recipes/puls_biznesu.recipe new file mode 100644 index 0000000000..ee4fc14c05 --- /dev/null +++ b/recipes/puls_biznesu.recipe @@ -0,0 +1,31 @@ +from calibre.web.feeds.news import BasicNewsRecipe +import re +class PB_PL(BasicNewsRecipe): + title = u'Puls Biznesu' + __author__ = 'fenuks' + language = 'pl' + description = u'Puls Biznesu - biznes, ekonomia, giełda, inwestycje' + category = u'newspaper' + publication_type = u'newspaper' + encoding = 'utf-8' + #masthead_url = 'http://www.pb.pl/img/pb.png' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + remove_empty_feeds = True + ignore_duplicate_articles = {'title', 'url'} + remove_tags_after = dict(name='div', attrs={'class':'news_content'}) + feeds = [(u'Wszystkie', u'http://www.pb.pl/atom'), (u'Puls inwestora', u'http://pulsinwestora.pb.pl/atom'), (u'Puls Firmy', u'http://firma.pb.pl/atom'), (u'PB Weekend', u'http://weekend.pb.pl/atom'), (u'Forum MPS', u'http://forummsp.pb.pl/atom'), (u'Moto', u'http://moto.pb.pl/atom'), (u'Kariera i praca', u'http://kariera.pb.pl/atom'),(u'Nieruchomości', u'http://nieruchomosci.pb.pl/atom'), (u'Samorządy', u'http://samorzady.pb.pl/atom'), (u'Tech', u'http://tech.pb.pl/atom'), (u'Energetyka', u'http://energetyka.pb.pl/atom'), (u'Retailing', u'http://retailing.pb.pl/atom'), (u'Puls medycyny', u'http://pulsmedycyny.pl/atom'), (u'Logistyka', u'http://logistyka.pb.pl/atom')] + + def print_version(self, url): + article_id = re.search(r'(?P\d+,\d+)', url) + if article_id: + return 'http://www.pb.pl/actionprint/' + article_id.group('id') + else: + return url + + def get_cover_url(self): + soup = self.index_to_soup('http://archiwum.pb.pl/') + cover = soup.find(name='img', attrs={'class':'cover_picture'}) + self.cover_url= cover['src'] + return getattr(self, 'cover_url', self.cover_url) diff --git a/recipes/stopklatka.recipe b/recipes/stopklatka.recipe new file mode 100644 index 0000000000..ace28087c4 --- /dev/null +++ b/recipes/stopklatka.recipe @@ -0,0 +1,25 @@ +from calibre.web.feeds.news import BasicNewsRecipe +import re +class Stopklatka(BasicNewsRecipe): + title = u'Stopklatka' + __author__ = 'fenuks' + description = u'Stopklatka.pl to najdłużej działający polski portal filmowy. Baza filmów, seriali i aktorów, repertuar kin, program tv, wydarzenia ze świata filmu' + category = 'movies' + language = 'pl' + oldest_article = 7 + masthead_url= 'http://img.stopklatka.pl/logo/logo-3.gif' + cover_url= 'http://img.stopklatka.pl/logo/logo-3.gif' + max_articles_per_feed = 100 + no_stylesheets = True + preprocess_regexps = [(re.compile(ur'Wersja internetowa dostępna jest pod adresem:.*', re.DOTALL), lambda match: ''), (re.compile(ur'', re.DOTALL), lambda match: '') ] + remove_empty_feeds = True + remove_tags = [dict(name='img', attrs={'alt':'logo'})] + feeds = [(u'Wydarzenia', u'http://rss.stopklatka.pl/wydarzenia.rss')] + + def print_version(self, url): + link_id = re.search(r'wi=(?P\d+)', url) + if link_id: + return 'http://www.stopklatka.pl/narzedzia/drukuj.asp?typ=wydarzenie&id=' + link_id.group('id') + else: + return url +