i'm merging 100's of HTML pages, all with embedded style elements in the head. Using BeautifulSoup to extract the contents of style but now left with the task for parsing the string into a dict {selector_str:properties_str}. Looking at tinycss and it gets me the selector '.c0' easily, but not the property string '{...}'.
Here's an example string
'.c0 { padding: 1px 0px 0px; font-size: 11px } .c1 { margin: 0px; font-size: 11px } .c2 { font-size: 11px } .c3 { font-size: 11px; font-style: italic; font-weight: bold } '
Suggestions? A regex hack welcome. This is the extent of the CSS. Class selectors .c0 to .c100(s) on every page and every page follows same pattern.
*hackor_hackproperties are parsed.)