erinxocon / requests-xml

Requests-XML: XML Parsing for Humans
http://xml.python-requests.org
MIT License
186 stars 6 forks source link

[Feature request] Pickle-ability of XML objects #5

Open devxpy opened 5 years ago

devxpy commented 5 years ago
In [2]: session = XMLSession()

In [3]: r = session.get('https://www.nasa.gov/rss/dyn/lg_image_of_the_day.rss')

In [15]: pickle.dumps(r.xml)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-15-27c48ce133a2> in <module>()
----> 1 pickle.dumps(r.xml)

TypeError: can't pickle HtmlElement objects

This is great for use in multiprocessing tasks.