Skip to content

Instantly share code, notes, and snippets.

@vdmit
Created November 2, 2021 21:02
Show Gist options
  • Save vdmit/ef9007170fa1c616cf5aba1fcebfce87 to your computer and use it in GitHub Desktop.
Save vdmit/ef9007170fa1c616cf5aba1fcebfce87 to your computer and use it in GitHub Desktop.
cssutils busy loop example
#!/usr/bin/env python3
import cssutils
css_parser = cssutils.CSSParser(validate=False)
# cssutils.log.setLevel(logging.FATAL)
css_text = '\'\'\':before{content:"\\f175"}.s1{content:"\\f178"}.s2:before{content:"\\f179"}.s3:before{content:"\\f17a"}.s4:before{content:"\\f17b"}.s5:before{content:"\\f17c"}.s6:before{content:"\\f17d"}.s7:before{content:"\\f17e"}.s8:before{content:"\\f180"}.s9:before{content:"\\f181"}.s10:before{content:"\\f182"}.s11:before{content:"\\f183"}'
sheet = css_parser.parseString(cssText=css_text)
css_urls = cssutils.getUrls(sheet)
print(list(css_urls))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment