>> from premailer import Premailer; import requests; url='https://www.smashingmagazine.com'; Premailer(html=requests.get(url).content.decode('utf-8'), base_url=url).transform()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/lavr/dev/.env/lib/python3.6/site-packages/premailer/premailer.py", line 358, in transform
style.text = self._css_rules_to_string(these_leftover)
File "/Users/lavr/dev/.env/lib/python3.6/site-packages/premailer/premailer.py", line 613, in _css_rules_to_string
for key in rule.style.keys():
AttributeError: 'CSSUnknownRule' object has no attribute 'style'
I know it's not usual source for email, but seems it covers some cssutils internals and might be easy to fix.
Exception on complicated style sheet:
I know it's not usual source for email, but seems it covers some cssutils internals and might be easy to fix.