diff --git a/resources/recipes/oldnewthing.recipe b/resources/recipes/oldnewthing.recipe index fc9749d403..8280451e17 100644 --- a/resources/recipes/oldnewthing.recipe +++ b/resources/recipes/oldnewthing.recipe @@ -28,7 +28,7 @@ class OldNewThing(BasicNewsRecipe): } remove_attributes = ['width','height'] - keep_only_tags = [dict(attrs={'class':['postsub','comment']})] - + keep_only_tags = [dict(attrs={'class':'full-post'})] + remove_tags = [dict(attrs={'class':['post-attributes','post-tags','post-actions']})] feeds = [(u'Posts', u'http://blogs.msdn.com/oldnewthing/rss.xml')] diff --git a/src/calibre/ebooks/metadata/fetch.py b/src/calibre/ebooks/metadata/fetch.py index 8b82d3c972..cb75d93f59 100644 --- a/src/calibre/ebooks/metadata/fetch.py +++ b/src/calibre/ebooks/metadata/fetch.py @@ -313,6 +313,8 @@ def search(title=None, author=None, publisher=None, isbn=None, isbndb_key=None, def sort_func(x, y): def cleanup_title(s): + if s is None: + s = _('Unknown') s = s.strip().lower() s = prefix_pat.sub(' ', s) s = trailing_paren_pat.sub('', s)