mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #6018 (Updated recipe for The Old New Thing blog) and fix regression in metadata download that could cause errors with some books
This commit is contained in:
parent
a4fc6f3b18
commit
8525faf60c
@ -28,7 +28,7 @@ class OldNewThing(BasicNewsRecipe):
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove_attributes = ['width','height']
|
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')]
|
feeds = [(u'Posts', u'http://blogs.msdn.com/oldnewthing/rss.xml')]
|
||||||
|
|
||||||
|
@ -313,6 +313,8 @@ def search(title=None, author=None, publisher=None, isbn=None, isbndb_key=None,
|
|||||||
def sort_func(x, y):
|
def sort_func(x, y):
|
||||||
|
|
||||||
def cleanup_title(s):
|
def cleanup_title(s):
|
||||||
|
if s is None:
|
||||||
|
s = _('Unknown')
|
||||||
s = s.strip().lower()
|
s = s.strip().lower()
|
||||||
s = prefix_pat.sub(' ', s)
|
s = prefix_pat.sub(' ', s)
|
||||||
s = trailing_paren_pat.sub('', s)
|
s = trailing_paren_pat.sub('', s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user