mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Various new Polish recipes
This commit is contained in:
parent
2767403b94
commit
651aeec502
23
recipes/forsal.recipe
Normal file
23
recipes/forsal.recipe
Normal file
@ -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
|
BIN
recipes/icons/forsal.png
Normal file
BIN
recipes/icons/forsal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
recipes/icons/nowy_ekran.png
Normal file
BIN
recipes/icons/nowy_ekran.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 660 B |
BIN
recipes/icons/puls_biznesu.png
Normal file
BIN
recipes/icons/puls_biznesu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 322 B |
BIN
recipes/icons/stopklatka.png
Normal file
BIN
recipes/icons/stopklatka.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 450 B |
16
recipes/nowy_ekran.recipe
Normal file
16
recipes/nowy_ekran.recipe
Normal file
@ -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/')]
|
31
recipes/puls_biznesu.recipe
Normal file
31
recipes/puls_biznesu.recipe
Normal file
@ -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<id>\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)
|
25
recipes/stopklatka.recipe
Normal file
25
recipes/stopklatka.recipe
Normal file
@ -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:.*</body>', re.DOTALL), lambda match: '</body>'), (re.compile(ur'</?font.*?>', 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<id>\d+)', url)
|
||||
if link_id:
|
||||
return 'http://www.stopklatka.pl/narzedzia/drukuj.asp?typ=wydarzenie&id=' + link_id.group('id')
|
||||
else:
|
||||
return url
|
||||
|
Loading…
x
Reference in New Issue
Block a user