mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Merge branch 'master' of https://github.com/t3d/calibre
This commit is contained in:
commit
fc8aa605a3
Binary file not shown.
Before Width: | Height: | Size: 1006 B |
@ -1,48 +0,0 @@
|
|||||||
#!/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;
|
|
||||||
remove_empty_feeds = True
|
|
||||||
oldest_article = 7
|
|
||||||
max_articles_per_feed = 100
|
|
||||||
cover_url='http://osnews.pl/wp-content/themes/osnews/img/logo.png'
|
|
||||||
extra_css = '''
|
|
||||||
.news-heading {font-size:150%}
|
|
||||||
.newsinformations li {display:inline;}
|
|
||||||
blockquote {border:2px solid #000; padding:5px;}
|
|
||||||
'''
|
|
||||||
|
|
||||||
feeds = [
|
|
||||||
(u'Niusy', u'http://feeds.feedburner.com/OSnewspl'),
|
|
||||||
(u'Wylęgarnia', u'http://feeds.feedburner.com/osnewspl_nowe')
|
|
||||||
]
|
|
||||||
|
|
||||||
keep_only_tags = [
|
|
||||||
dict(name = 'div', attrs = {'id' : 'content'})
|
|
||||||
]
|
|
||||||
|
|
||||||
remove_tags = [
|
|
||||||
dict(name = 'div', attrs = {'class' : ['newstags', 'tw_button', 'post_prev']}),
|
|
||||||
dict(name = 'div', attrs = {'id' : 'newspage_upinfo'}),
|
|
||||||
]
|
|
||||||
|
|
||||||
remove_tags_after = dict(name = 'div', attrs = {'class' : 'post_prev'})
|
|
||||||
preprocess_regexps = [(re.compile(u'</span>Komentarze: \(?[0-9]+\)? ?<span'), lambda match: '</span><span'), (re.compile(u'<iframe.+?</iframe>'), lambda match: '')]
|
|
Loading…
x
Reference in New Issue
Block a user