Search code examples
curlwgetfavicon

Google's change of favicon service


For a long time you could get the favicon of every site from a public Google link, it had the format

https://www.google.com/s2/favicons?domain=stackoverflow.com

It was possible to download it with curl or wget.

Not the link redirects to

https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=http://stackoverflow.com&size=16

And it doesn't seem to be possible anymore to download it with a command.

When you try

curl https://t0.gstatic.com/faviconV2?client=SOCIAL&url=https%3A%2F%2Fbrutalist.report&size=16 --output favicon.png

You get the output

Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: " to save to a file.

And nothing happens, you have to stop the execution manually.

Does someone know how to resolve that?


Solution

  • It was possible to download it with curl or wget.

    I did run following wget command

    wget -O stackoverflow.png https://www.google.com/s2/favicons?domain=stackoverflow.com
    

    and I got 16 x 16 PNG image named stackoverflow.png which to my understanding is what it should be. Please try above code and write what effect it had.