ultimate-sitemap-parser
ultimate-sitemap-parser copied to clipboard
Convert SitemapNewsStory to dict
usp.objects.page.SitemapNewsStory has no attribute __dict__ because of the usage of slots. Therefore, vars() and __dict__() don't work. It would be nice to have an option to parse the attributes to a dict.
In [39]: a[-1].__dict__()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-39-ab06281650cf> in <module>
----> 1 a[-1].__dict__()
AttributeError: 'SitemapPage' object has no attribute '__dict__'
In [40]: vars(a[-1])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-ada32e179a17> in <module>
----> 1 vars(a[-1])
TypeError: vars() argument must have __dict__ attribute
Thanks for this lib. Works well.