Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jin10086/cssstyle2dict
https://github.com/jin10086/cssstyle2dict
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/jin10086/cssstyle2dict
- Owner: jin10086
- License: mit
- Created: 2020-05-31T06:02:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-31T06:05:26.000Z (over 4 years ago)
- Last Synced: 2025-01-10T22:12:20.150Z (3 days ago)
- Language: Python
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cssstyle2dict
===========方便查找css style里面的属性,css反爬虫用的比较多
Sample Code
-----------```python
>>> 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`