jeudi 14 juillet 2016

Download a zip file and extract it in memory using Python3


I would like to download a zip file from internet and extract it.

I would rather use requests. I don't want to write to the disk.

I knew how to do that in Python2 but I am clueless for python3.3. Apparently, zipfile.Zipfile wants a file-like object but I don't know how to get that from what requests returns.

If you know how to do it with urllib.request, I would be curious to see how you do it too.


Aucun commentaire:

Enregistrer un commentaire