This commit is contained in:
Kovid Goyal 2011-03-17 11:02:46 -06:00
parent 6ff633fc7a
commit c999b12063
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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: