You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other library used does not correctly parse the files when there are mistakes in the CSS file. Here is something that will work. Thoughts?
stylesheet=cssutils.parseFile(css_file)
image_references= []
forruleinstylesheet:
ifrule.type==cssutils.css.CSSRule.STYLE_RULE:
fordeclarationinrule.style:
ifdeclaration.name=='background-image':
# Use regular expression to match url( and capture everything within parenthesesmatch=re.search(r'url\(([^)]+)\)', declaration.value)
ifmatch:
image_references.append(match.group(1))
Hi,
It seems that images in the CSS are not downloaded, like
Not familiar with Python, but I would try to fix this.
Thank you,
Justin
The text was updated successfully, but these errors were encountered: