This commit is contained in:
Kovid Goyal 2013-08-02 16:46:15 +05:30
parent 3c777a8154
commit 211aff74d7

View File

@ -1,4 +1,3 @@
__license__ = 'GPL v3'
__copyright__ = '2008 - 2011, Darko Miletic <darko.miletic at gmail.com>'
'''
@ -17,7 +16,6 @@ class TheScotsman(BasicNewsRecipe):
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
auto_cleanup = True
language = 'en_GB'
encoding = 'utf-8'
publication_type = 'newspaper'
@ -25,14 +23,7 @@ class TheScotsman(BasicNewsRecipe):
masthead_url = 'http://www.scotsman.com/webimage/swts_thescotsman_image_e_7_25526!image/3142543874.png_gen/derivatives/default/3142543874.png'
extra_css = 'body{font-family: Arial,Helvetica,sans-serif}'
#keep_only_tags = [dict(attrs={'class':'editorialSection'})]
#remove_tags_after = dict(attrs={'class':'socialBookmarkPanel'})
#remove_tags = [
#dict(name=['meta','iframe','object','embed','link']),
#dict(attrs={'class':['secondaryArticlesNav','socialBookmarkPanel']}),
#dict(attrs={'id':'relatedArticles'})
#]
keep_only_tags = [dict(name='div', attrs={'class':'article'})]
remove_attributes = ['lang']
conversion_options = {
@ -56,10 +47,3 @@ class TheScotsman(BasicNewsRecipe):
('Opinion' , 'http://www.scotsman.com/cmlink/1.957054')
]
#def preprocess_html(self, soup):
#for item in soup.findAll(style=True):
#del item['style']
#for item in soup.findAll('img'):
#if not item.has_key('alt'):
#item['alt'] = 'image'
#return soup