Volver a cargar archivos con solicitudes de Python

I need to download bunches of images from one site and upload them through a form into another site. I'm using Python Requests for this purpose. Do I just do:

r = requests.get(image_url)

Or do I need to do something with the binary contents of the first response, for it to be understood as a file by the remote server?

preguntado el 06 de septiembre de 12 a las 15:09

Have you tried? What's the result? -

@PiotrDobrogost - I understand your sentiment, but I'm afraid that in my case, 'trying' would be too much trouble even than waiting a couple of days to be given such a short bit of code. I'm about to try passing the file through StringIO, that's what Google gave me when I searched about in-memory files. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.