This commit is contained in:
Kovid Goyal 2016-10-08 09:00:05 +05:30
commit 6484275560
8 changed files with 2 additions and 94 deletions

View File

@ -10,8 +10,6 @@ class AlejaKomiksu(BasicNewsRecipe):
category = 'comics'
language = 'pl'
extra_css = 'ul {list-style-type: none;} .gfx_news {float: right;}'
preprocess_regexps = [(re.compile(ur'((<li class="no_img_b">(Do poczytania)|(Nowości):</li>)|(<p class="head2">Komentarze</p>)).*</body>',
re.DOTALL | re.IGNORECASE), lambda match: '</body>')]
cover_url = 'http://www.alejakomiksu.com/gfx/build/logo.png'
masthead_url = 'http://www.alejakomiksu.com/gfx/build/logo.png'
use_embedded_content = False
@ -23,7 +21,7 @@ class AlejaKomiksu(BasicNewsRecipe):
remove_attributes = ['style', 'font']
ignore_duplicate_articles = {'title', 'url'}
keep_only_tags = [dict(attrs={'class': 'cont_tresc'})]
keep_only_tags = dict(attrs={'class': ['akNews__header','akNews__body']})
feeds = [(u'Wiadomości', 'http://www.alejakomiksu.com/rss.php5')]

View File

@ -1,30 +0,0 @@
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai
from calibre.web.feeds.news import BasicNewsRecipe
class Astroflesz(BasicNewsRecipe):
title = u'Astroflesz'
oldest_article = 7
__author__ = 'fenuks'
description = u'astroflesz.pl - to portal poświęcony astronomii. Informuje zarówno o aktualnych wydarzeniach i odkryciach naukowych, jak również zapowiada ciekawe zjawiska astronomiczne' # noqa
category = 'astronomy'
language = 'pl'
cover_url = 'http://www.astroflesz.pl/templates/astroflesz/images/logo/logo.png'
ignore_duplicate_articles = {'title', 'url'}
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
remove_empty_feeds = True
remove_attributes = ['style']
keep_only_tags = [dict(id="k2Container")]
remove_tags_after = dict(name='div', attrs={'class': 'itemLinks'})
remove_tags = [dict(name='div', attrs={
'class': ['itemLinks', 'itemToolbar', 'itemRatingBlock']})]
feeds = [(u'Wszystkie', u'http://astroflesz.pl/?format=feed')]
def postprocess_html(self, soup, first_fetch):
t = soup.find(attrs={'class': 'itemIntroText'})
if t:
for i in t.findAll('img'):
i['style'] = 'float: left; margin-right: 5px;'
return soup

View File

@ -1,31 +0,0 @@
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from calibre.web.feeds.news import BasicNewsRecipe
class Biolog_pl(BasicNewsRecipe):
title = u'Biolog.pl'
oldest_article = 7
max_articles_per_feed = 100
remove_empty_feeds = True
__author__ = 'fenuks'
description = u'Przyrodnicze aktualności ze świata nauki (codziennie aktualizowane), kurs biologii, testy i sprawdziany, forum dyskusyjne.'
category = 'biology'
language = 'pl'
masthead_url = 'http://www.biolog.pl/naukowy,portal,biolog.png'
cover_url = 'http://www.biolog.pl/naukowy,portal,biolog.png'
no_stylesheets = True
ignore_duplicate_articles = {'title', 'url'}
# keeps_only_tags=[dict(id='main')]
remove_tags_before = dict(id='main')
remove_tags_after = dict(name='a', attrs={'name': 'komentarze'})
remove_tags = [dict(name='img', attrs={'alt': 'Komentarze'}), dict(
name='span', attrs={'class': 'menu_odsylacze'})]
feeds = [
(u'Wszystkie', u'http://www.biolog.pl/backend.php'),
(u'Medycyna', u'http://www.biolog.pl/medycyna-rss.php'),
(u'Ekologia', u'http://www.biolog.pl/rss-ekologia.php'),
(u'Genetyka i biotechnologia', u'http://www.biolog.pl/rss-biotechnologia.php'),
(u'Botanika', u'http://www.biolog.pl/rss-botanika.php'),
(u'Le\u015bnictwo', u'http://www.biolog.pl/rss-lesnictwo.php'),
(u'Zoologia', u'http://www.biolog.pl/rss-zoologia.php')]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

View File

@ -1,27 +0,0 @@
__license__ = 'GPL v3'
from calibre.web.feeds.news import BasicNewsRecipe
class WebSecurity(BasicNewsRecipe):
title = u'WebSecurity'
__author__ = 'fenuks'
description = u'WebSecurity.pl to największy w Polsce portal o bezpieczeństwie sieciowym.'
category = ''
language = 'pl'
cover_url = 'http://websecurity.pl/images/websecurity-logo.png'
masthead_url = ''
use_embedded_content = False
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
remove_javascript = True
remove_attributes = ['style', 'font']
ignore_duplicate_articles = {'title', 'url'}
keep_only_tags = [
dict(attrs={'class': 'article single'}), dict(id='content')]
remove_tags = [dict(attrs={'class': ['sociable', 'no-comments']})]
remove_tags_after = dict(attrs={'class': 'sociable'})
feeds = [(u'Wszystkie', u'http://websecurity.pl/feed/'), (u'Aktualno\u015bci', u'http://websecurity.pl/aktualnosci/feed/'),
(u'Artyku\u0142y', u'http://websecurity.pl/artykuly/feed/'), (u'Blogosfera', u'http://websecurity.pl/blogosfera/wpisy/feed/')]

View File

@ -17,7 +17,5 @@ class ZnadPlanszy(BasicNewsRecipe):
remove_attributes = ['style', 'font']
ignore_duplicate_articles = {'title', 'url'}
remove_tags = [dict(attrs={'class': 'rounded-container'})]
remove_tags_after = dict(attrs={'id': 'dotEPUBcontent'})
remove_tags_before = dict(attrs={'class': 'content units nine alpha'})
keep_only_tags = dict(name='article')
feeds = [(u'Wszystkie', 'http://znadplanszy.pl/full-feed/posts/')]