diff --git a/src/calibre/ebooks/metadata/sources/google.py b/src/calibre/ebooks/metadata/sources/google.py index 153f9f4d8e..c44ad81b6c 100644 --- a/src/calibre/ebooks/metadata/sources/google.py +++ b/src/calibre/ebooks/metadata/sources/google.py @@ -50,7 +50,7 @@ def get_details(browser, url, timeout): # {{{ if gc() != 403: raise # Google is throttling us, wait a little - time.sleep(1) + time.sleep(2) raw = browser.open_novisit(url, timeout=timeout).read() return raw diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 7f3f40184c..17cbc9c947 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -229,7 +229,11 @@ def rewrite_links(root, link_repl_func, resolve_base_href=False): if 'style' in el.attrib: text = el.attrib['style'] if _css_url_re.search(text) is not None: - stext = parseStyle(text) + try: + stext = parseStyle(text) + except: + # Parsing errors are raised by cssutils + continue for p in stext.getProperties(all=True): v = p.cssValue if v.CSS_VALUE_LIST == v.cssValueType: