Fix #7701 (Updated recipe for the Wokingham times)

This commit is contained in:
Kovid Goyal 2010-11-27 09:16:48 -07:00
parent 5834a210d9
commit 030d4825fd
2 changed files with 9 additions and 9 deletions

View File

Before

Width:  |  Height:  |  Size: 1011 B

After

Width:  |  Height:  |  Size: 1011 B

View File

@ -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