mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7701 (Updated recipe for the Wokingham times)
This commit is contained in:
parent
5834a210d9
commit
030d4825fd
Before Width: | Height: | Size: 1011 B After Width: | Height: | Size: 1011 B |
@ -6,8 +6,8 @@ www.getwokingham.co.uk
|
||||
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
|
||||
class TheWorkinghamTimes(BasicNewsRecipe):
|
||||
title = 'The Workingham Times'
|
||||
class TheWokinghamTimes(BasicNewsRecipe):
|
||||
title = 'The Wokingham Times'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'News from UK'
|
||||
oldest_article = 2
|
||||
@ -19,11 +19,11 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
||||
category = 'news, UK, world'
|
||||
language = 'en_GB'
|
||||
publication_type = 'newsportal'
|
||||
extra_css = """
|
||||
extra_css = """
|
||||
body{ font-family: Arial,sans-serif }
|
||||
img{display: block; margin-bottom: 0.4em}
|
||||
img{display: block; margin-bottom: 0.4em}
|
||||
"""
|
||||
|
||||
|
||||
conversion_options = {
|
||||
'comments' : description
|
||||
,'tags' : category
|
||||
@ -32,10 +32,10 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'id':'article-body'})]
|
||||
remove_tags = [
|
||||
remove_tags = [
|
||||
dict(name='div' , attrs={'class':['ad']})
|
||||
,dict(name=['meta','base','iframe','embed','object'])
|
||||
,dict(name='span' , attrs={'class':'caption small'})
|
||||
,dict(name='span' , attrs={'class':'caption small'})
|
||||
]
|
||||
remove_attributes = ['width','height','lang']
|
||||
|
||||
@ -55,5 +55,5 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
||||
item.replaceWith(str)
|
||||
else:
|
||||
item.name = 'span'
|
||||
del item['href']
|
||||
return soup
|
||||
del item['href']
|
||||
return soup
|
Loading…
x
Reference in New Issue
Block a user