0

I'm trying to download pictures from Google in the Mac's terminal. Please explain how to do this in the simplest way as I'm a complete beginner. Use this picture as the example please: https://imgur.com/gallery/yu5An

I have already used

curl -O https://imgur.com/gallery/yu5An

But this doesn't seem to work.

overfl0w
  • 49
  • 1
  • 5
  • Hi, welcome to StackOverflow. 'This doesn't seem to work' is not sufficient evidence. Please edit the question to explain exactly what output you are getting. Thank you. – MandyShaw Nov 03 '18 at 19:54
  • See also, https://stackoverflow.com/q/5916276/499581, https://stackoverflow.com/q/32330737/499581 – l'L'l Nov 03 '18 at 21:46

1 Answers1

0

The command is fine but you need to use the URL of the image

curl -O https://i.imgur.com/PmPGYHR.png

If you want to get the image URL from the URL you referred, you can do

curl https://imgur.com/gallery/yu5An |grep "link rel=\"image_src" |cut -d'"' -f4
Lili Sousa
  • 71
  • 1
  • 6