Skip to content
Advertisement

Trying to download image from tumblr using java selenium

I’m trying to download images form tumblr using java selenium. I extracted the url of the image from src and tried to download images from url. But the images saved not what I expected. Those are in unsupported formats and smaller in size. How can I correct this? Please help.

This is my code:

JavaScript

Advertisement

Answer

I don’t have idea on BufferedInputStream to download image from URL. Instead, I used to use curl to download from URL. I have modified your code and its working fine for me.

JavaScript

My downloaded images: enter image description here

Advertisement