mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Osnews.pl and SwiatKindle by Mori
This commit is contained in:
parent
1976ca3663
commit
e76ce9e51a
50
resources/recipes/osnews_pl.recipe
Normal file
50
resources/recipes/osnews_pl.recipe
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
'''
|
||||||
|
OSNews.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
class OSNewsRecipe(BasicNewsRecipe):
|
||||||
|
__author__ = u'Mori & Tomasz D\u0142ugosz'
|
||||||
|
language = 'pl'
|
||||||
|
|
||||||
|
title = u'OSnews.pl'
|
||||||
|
publisher = u'OSnews.pl'
|
||||||
|
description = u'OSnews.pl jest spo\u0142eczno\u015bciowym serwisem informacyjnym po\u015bwi\u0119conym oprogramowaniu, systemom operacyjnym i \u015bwiatowi IT'
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
encoding = 'utf-8'
|
||||||
|
use_embedded_content = False;
|
||||||
|
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
.news-heading {font-size:150%}
|
||||||
|
.newsinformations li {display:inline;}
|
||||||
|
blockquote {border:2px solid #000; padding:5px;}
|
||||||
|
'''
|
||||||
|
|
||||||
|
feeds = [
|
||||||
|
(u'OSNews.pl', u'http://feeds.feedburner.com/OSnewspl')
|
||||||
|
]
|
||||||
|
|
||||||
|
keep_only_tags = [
|
||||||
|
dict(name = 'a', attrs = {'class' : 'news-heading'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'newsinformations'}),
|
||||||
|
dict(name = 'div', attrs = {'id' : 'news-content'})
|
||||||
|
]
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(name = 'div', attrs = {'class' : 'sociable'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_prev'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'post_next'}),
|
||||||
|
dict(name = 'div', attrs = {'class' : 'clr'})
|
||||||
|
]
|
||||||
|
|
||||||
|
preprocess_regexps = [(re.compile(u'</span>Komentarze: \(?[0-9]+\)? ?<span'), lambda match: '</span><span')]
|
24
resources/recipes/swiatkindle.recipe
Normal file
24
resources/recipes/swiatkindle.recipe
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = u'2011, Tomasz Dlugosz <tomek3d@gmail.com>'
|
||||||
|
'''
|
||||||
|
swiatkindle.pl
|
||||||
|
'''
|
||||||
|
|
||||||
|
import re
|
||||||
|
|
||||||
|
class swiatkindle(BasicNewsRecipe):
|
||||||
|
title = u'Swiat Kindle'
|
||||||
|
description = u'Blog o czytniku Amazon Kindle. Wersje, ksi\u0105\u017cki, kupowanie i korzystanie w Polsce'
|
||||||
|
language = 'pl'
|
||||||
|
__author__ = u'Tomasz D\u0142ugosz'
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
|
||||||
|
feeds = [(u'\u015awiat Kindle - wpisy', u'http://swiatkindle.pl/feed')]
|
||||||
|
|
||||||
|
remove_tags = [dict(name = 'ul', attrs = {'class' : 'similar-posts'})]
|
||||||
|
|
||||||
|
preprocess_regexps = [(re.compile(u'<h3>Czytaj dalej:</h3>'), lambda match: '')]
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user