mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
...
This commit is contained in:
parent
3c777a8154
commit
211aff74d7
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008 - 2011, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2008 - 2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
@ -12,54 +11,39 @@ class TheScotsman(BasicNewsRecipe):
|
|||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = 'News from Scotland'
|
description = 'News from Scotland'
|
||||||
publisher = 'Johnston Publishing Ltd.'
|
publisher = 'Johnston Publishing Ltd.'
|
||||||
category = 'news, politics, Scotland, UK'
|
category = 'news, politics, Scotland, UK'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
auto_cleanup = True
|
|
||||||
language = 'en_GB'
|
language = 'en_GB'
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
publication_type = 'newspaper'
|
publication_type = 'newspaper'
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
masthead_url = 'http://www.scotsman.com/webimage/swts_thescotsman_image_e_7_25526!image/3142543874.png_gen/derivatives/default/3142543874.png'
|
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}'
|
extra_css = 'body{font-family: Arial,Helvetica,sans-serif}'
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'article'})]
|
||||||
#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'})
|
|
||||||
#]
|
|
||||||
remove_attributes = ['lang']
|
remove_attributes = ['lang']
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comment' : description
|
'comment' : description
|
||||||
, 'tags' : category
|
, 'tags' : category
|
||||||
, 'publisher' : publisher
|
, 'publisher' : publisher
|
||||||
, 'language' : language
|
, 'language' : language
|
||||||
}
|
}
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('Latest News' , 'http://www.scotsman.com/cmlink/1.957140' ),
|
('Latest News' , 'http://www.scotsman.com/cmlink/1.957140'),
|
||||||
('UK' , 'http://www.scotsman.com/cmlink/1.957142' ),
|
('UK' , 'http://www.scotsman.com/cmlink/1.957142'),
|
||||||
('Scotland' , 'http://www.scotsman.com/cmlink/1.957141' ),
|
('Scotland' , 'http://www.scotsman.com/cmlink/1.957141'),
|
||||||
('International', 'http://www.scotsman.com/cmlink/1.957143' ),
|
('International', 'http://www.scotsman.com/cmlink/1.957143'),
|
||||||
('Politics' , 'http://www.scotsman.com/cmlink/1.957044' ),
|
('Politics' , 'http://www.scotsman.com/cmlink/1.957044'),
|
||||||
('Arts' , 'http://www.scotsman.com/cmlink/1.1804825'),
|
('Arts' , 'http://www.scotsman.com/cmlink/1.1804825'),
|
||||||
('Entertainment', 'http://www.scotsman.com/cmlink/1.957053' ),
|
('Entertainment', 'http://www.scotsman.com/cmlink/1.957053'),
|
||||||
('Sports' , 'http://www.scotsman.com/cmlink/1.957151' ),
|
('Sports' , 'http://www.scotsman.com/cmlink/1.957151'),
|
||||||
('Business' , 'http://www.scotsman.com/cmlink/1.957156' ),
|
('Business' , 'http://www.scotsman.com/cmlink/1.957156'),
|
||||||
('Features' , 'http://www.scotsman.com/cmlink/1.957149' ),
|
('Features' , 'http://www.scotsman.com/cmlink/1.957149'),
|
||||||
('Opinion' , 'http://www.scotsman.com/cmlink/1.957054' )
|
('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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user