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
|
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||||
|
|
||||||
class TheWorkinghamTimes(BasicNewsRecipe):
|
class TheWokinghamTimes(BasicNewsRecipe):
|
||||||
title = 'The Workingham Times'
|
title = 'The Wokingham Times'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'News from UK'
|
description = 'News from UK'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
@ -19,11 +19,11 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
|||||||
category = 'news, UK, world'
|
category = 'news, UK, world'
|
||||||
language = 'en_GB'
|
language = 'en_GB'
|
||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
extra_css = """
|
extra_css = """
|
||||||
body{ font-family: Arial,sans-serif }
|
body{ font-family: Arial,sans-serif }
|
||||||
img{display: block; margin-bottom: 0.4em}
|
img{display: block; margin-bottom: 0.4em}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comments' : description
|
'comments' : description
|
||||||
,'tags' : category
|
,'tags' : category
|
||||||
@ -32,10 +32,10 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
|||||||
}
|
}
|
||||||
|
|
||||||
keep_only_tags = [dict(name='div', attrs={'id':'article-body'})]
|
keep_only_tags = [dict(name='div', attrs={'id':'article-body'})]
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='div' , attrs={'class':['ad']})
|
dict(name='div' , attrs={'class':['ad']})
|
||||||
,dict(name=['meta','base','iframe','embed','object'])
|
,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']
|
remove_attributes = ['width','height','lang']
|
||||||
|
|
||||||
@ -55,5 +55,5 @@ class TheWorkinghamTimes(BasicNewsRecipe):
|
|||||||
item.replaceWith(str)
|
item.replaceWith(str)
|
||||||
else:
|
else:
|
||||||
item.name = 'span'
|
item.name = 'span'
|
||||||
del item['href']
|
del item['href']
|
||||||
return soup
|
return soup
|
Loading…
x
Reference in New Issue
Block a user