mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Pull from trunk
This commit is contained in:
commit
c372526ba9
@ -19,7 +19,7 @@ from cssutils.css import CSSStyleRule, CSSPageRule, CSSStyleDeclaration, \
|
||||
CSSValueList, cssproperties
|
||||
from cssutils.profiles import profiles as cssprofiles
|
||||
from lxml import etree
|
||||
from lxml.cssselect import css_to_xpath, ExpressionError
|
||||
from lxml.cssselect import css_to_xpath, ExpressionError, SelectorSyntaxError
|
||||
from calibre.ebooks.oeb.base import XHTML, XHTML_NS, CSS_MIME, OEB_STYLES
|
||||
from calibre.ebooks.oeb.base import XPNSMAP, xpath, urlnormalize
|
||||
from calibre.ebooks.oeb.profile import PROFILES
|
||||
@ -159,7 +159,9 @@ class Stylizer(object):
|
||||
for _, _, cssdict, text, _ in rules:
|
||||
try:
|
||||
selector = CSSSelector(text)
|
||||
except (AssertionError, ExpressionError, etree.XPathSyntaxError):
|
||||
except (AssertionError, ExpressionError, etree.XPathSyntaxError,\
|
||||
NameError, # gets thrown on OS X instead of SelectorSyntaxError
|
||||
SelectorSyntaxError):
|
||||
continue
|
||||
for elem in selector(tree):
|
||||
self.style(elem)._update_cssdict(cssdict)
|
||||
|
BIN
src/calibre/gui2/images/news/nytimes_sub.png
Normal file
BIN
src/calibre/gui2/images/news/nytimes_sub.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 866 B |
@ -6,7 +6,7 @@ Builtin recipes.
|
||||
'''
|
||||
recipe_modules = ['recipe_' + r for r in (
|
||||
'newsweek', 'atlantic', 'economist', 'portfolio', 'the_register',
|
||||
'nytimes', 'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj',
|
||||
'usatoday', 'outlook_india', 'bbc', 'greader', 'wsj',
|
||||
'wired', 'globe_and_mail', 'smh', 'espn', 'business_week', 'miami_herald',
|
||||
'ars_technica', 'upi', 'new_yorker', 'irish_times', 'iht', 'lanacion',
|
||||
'discover_magazine', 'scientific_american', 'new_york_review_of_books',
|
||||
|
2
todo
2
todo
@ -6,3 +6,5 @@
|
||||
* Use multiprocessing for cpu_count instead of QThread
|
||||
|
||||
* Rationalize books table. Add a pubdate column, remove the uri column (and associated support in add_books) and convert series_index to a float.
|
||||
|
||||
* Replace single application stuff with Listener from multiprocessing
|
||||
|
Loading…
x
Reference in New Issue
Block a user