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 0000000000..fb1f9044ce Binary files /dev/null and b/recipes/icons/forsal.png differ diff --git a/recipes/icons/nowy_ekran.png b/recipes/icons/nowy_ekran.png new file mode 100644 index 0000000000..3ff4f59074 Binary files /dev/null and b/recipes/icons/nowy_ekran.png differ diff --git a/recipes/icons/puls_biznesu.png b/recipes/icons/puls_biznesu.png new file mode 100644 index 0000000000..793fdb0a50 Binary files /dev/null and b/recipes/icons/puls_biznesu.png differ diff --git a/recipes/icons/stopklatka.png b/recipes/icons/stopklatka.png new file mode 100644 index 0000000000..1972a60d20 Binary files /dev/null and b/recipes/icons/stopklatka.png differ 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 +