mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Update Metro UK
This commit is contained in:
parent
3690241ab1
commit
6c7ff4e4e6
@ -7,22 +7,26 @@ import time
|
||||
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
title = u'Metro UK'
|
||||
description = 'News from The Metro, UK'
|
||||
#timefmt = ''
|
||||
__author__ = 'Dave Asbury'
|
||||
#last update 4/4/13
|
||||
#cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg'
|
||||
|
||||
cover_url = 'https://twimg0-a.akamaihd.net/profile_images/1638332595/METRO_LETTERS-01.jpg'
|
||||
remove_empty_feeds = True
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
max_articles_per_feed = 12
|
||||
ignore_duplicate_articles = {'title', 'url'}
|
||||
encoding = 'UTF-8'
|
||||
#encoding = 'UTF-8'
|
||||
|
||||
language = 'en_GB'
|
||||
masthead_url = 'http://e-edition.metro.co.uk/images/metro_logo.gif'
|
||||
compress_news_images = True
|
||||
compress_news_images_max_size = 30
|
||||
remove_attributes = ['style', 'font']
|
||||
preprocess_regexps = [
|
||||
|
||||
(re.compile(r'\| Metro News', re.IGNORECASE | re.DOTALL), lambda match: ''),
|
||||
]
|
||||
|
||||
def parse_index(self):
|
||||
articles = {}
|
||||
key = None
|
||||
@ -73,5 +77,5 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
description=description,
|
||||
content=''))
|
||||
#ans = self.sort_index_by(ans, {'The Front Page':-1, 'Dining In, Dining Out':1, 'Obituaries':2})
|
||||
ans = [(key, articles[key]) for key in ans if articles.has_key(key)]
|
||||
ans = [(key, articles[key]) for key in ans if key in articles]
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user