diff --git a/recipes/metro_uk.recipe b/recipes/metro_uk.recipe index 26133edbd9..deced5976b 100644 --- a/recipes/metro_uk.recipe +++ b/recipes/metro_uk.recipe @@ -1,5 +1,4 @@ from calibre.web.feeds.news import BasicNewsRecipe - class AdvancedUserRecipe1306097511(BasicNewsRecipe): title = u'Metro UK' @@ -14,7 +13,9 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): masthead_url = 'http://e-edition.metro.co.uk/images/metro_logo.gif' keep_only_tags = [ - dict(name='h1', attrs={'':''}), + dict(attrs={'class':['img-cnt figure']}), + dict(attrs={'class':['art-img']}), + dict(name='h1'), dict(name='h2', attrs={'class':'h2'}), dict(name='div', attrs={'class':'art-lft'}) ] @@ -24,3 +25,5 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): feeds = [ (u'News', u'http://www.metro.co.uk/rss/news/'), (u'Money', u'http://www.metro.co.uk/rss/money/'), (u'Sport', u'http://www.metro.co.uk/rss/sport/'), (u'Film', u'http://www.metro.co.uk/rss/metrolife/film/'), (u'Music', u'http://www.metro.co.uk/rss/metrolife/music/'), (u'TV', u'http://www.metro.co.uk/rss/tv/'), (u'Showbiz', u'http://www.metro.co.uk/rss/showbiz/'), (u'Weird News', u'http://www.metro.co.uk/rss/weird/'), (u'Travel', u'http://www.metro.co.uk/rss/travel/'), (u'Lifestyle', u'http://www.metro.co.uk/rss/lifestyle/'), (u'Books', u'http://www.metro.co.uk/rss/lifestyle/books/'), (u'Food', u'http://www.metro.co.uk/rss/lifestyle/restaurants/')] + + diff --git a/src/calibre/ebooks/metadata/book/base.py b/src/calibre/ebooks/metadata/book/base.py index 3e2201f6a4..69407dcb2e 100644 --- a/src/calibre/ebooks/metadata/book/base.py +++ b/src/calibre/ebooks/metadata/book/base.py @@ -74,7 +74,7 @@ class Metadata(object): Metadata from custom columns should be accessed via the get() method, passing in the lookup name for the column, for example: "#mytags". - Use the :meth:`is_null` method to test if a filed is null. + Use the :meth:`is_null` method to test if a field is null. This object also has functions to format fields into strings. @@ -105,7 +105,7 @@ class Metadata(object): def is_null(self, field): ''' - Return True if the value of filed is null in this object. + Return True if the value of field is null in this object. 'null' means it is unknown or evaluates to False. So a title of _('Unknown') is null or a language of 'und' is null.