Skip to main content

css style to dict

Project description

cssstyle2dict

方便查找css style里面的属性,css反爬虫用的比较多

Sample Code

>>> from cssstyle2dict import styleParsel
>>> css = '.a { float:left } .b { margin-right:-1em } .c { float:left } .a { position:relative }'
>>> style_dict = styleParsel(css)
>>> print(style_dict)
{'a': {'float': 'left', 'position': 'relative'},
'b': {'margin-right': '-1em'},
'c': {'float': 'left'}}

Installation

  • pip install cssstyle2dict

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cssstyle2dict-0.0.1.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

cssstyle2dict-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page