mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
include title, remove some garbage
This commit is contained in:
parent
3a942a43fe
commit
b4684dca7a
@ -3,7 +3,7 @@ import re
|
||||
|
||||
class Dobreprogramy_pl(BasicNewsRecipe):
|
||||
title = 'Dobreprogramy.pl'
|
||||
__author__ = 'fenuks'
|
||||
__author__ = u'fenuks & Tomasz Długosz'
|
||||
__licence__ ='GPL v3'
|
||||
category = 'IT'
|
||||
masthead_url='http://static.dpcdn.pl/css/Black/Images/header_logo_napis_fullVersion.png'
|
||||
@ -18,9 +18,9 @@ class Dobreprogramy_pl(BasicNewsRecipe):
|
||||
max_articles_per_feed = 100
|
||||
remove_attrs = ['style', 'width', 'height']
|
||||
preprocess_regexps = [(re.compile(ur'<div id="\S+360pmp4">Twoja przeglądarka nie obsługuje Flasha i HTML5 lub wyłączono obsługę JavaScript...</div>'), lambda match: '') ]
|
||||
keep_only_tags = [dict(attrs={'class':['entry single']}), dict(id='phContent_divArticle')]
|
||||
remove_tags = [dict(attrs={'class':['newsOptions', 'noPrint', 'komentarze', 'tags font-heading-master', 'social nested-grid grid-margin-px15-top clearfix no-mobile', 'page-info text-h4 font-heading grid-margin-px15-top color-annotation clearfix']}), dict(id='komentarze'), dict(name='iframe')]
|
||||
#remove_tags = [dict(name='div', attrs={'class':['komentarze', 'block', 'portalInfo', 'menuBar', 'topBar']})]
|
||||
keep_only_tags = [dict(name='h1'), dict(attrs={'class':['entry single']}), dict(id='phContent_divArticle')]
|
||||
remove_tags = [dict(attrs={'class':['newsOptions', 'noPrint', 'komentarze', 'tags font-heading-master', 'social nested-grid grid-margin-px15-top clearfix no-mobile', 'page-info text-h4 font-heading grid-margin-px15-top color-annotation clearfix', 'series grid-margin-px30-top']}), dict(id='komentarze'), dict(id='phContent_ctl02_sBreadcrumb'), dict(name='iframe')]
|
||||
|
||||
feeds = [(u'Aktualności', 'http://feeds.feedburner.com/dobreprogramy/Aktualnosci'),
|
||||
('Blogi', 'http://feeds.feedburner.com/dobreprogramy/BlogCzytelnikow')]
|
||||
|
||||
@ -36,4 +36,8 @@ class Dobreprogramy_pl(BasicNewsRecipe):
|
||||
for r in soup.findAll('span', text=''):
|
||||
if not r.string:
|
||||
r.extract()
|
||||
return soup
|
||||
return soup
|
||||
|
||||
extra_css = '''
|
||||
h1 { font-size:130% }
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user