Get website thumbnails from your URLs

I want to save the thumbnails of the website by simply entering their URLs, for example, if I enter http://www.google.com , it should generate a thumbnail of the google search page.

One of the APIs I have used so far is http://counter2.goingup.com/thumboo/image.php . Sample URL for this:

http://counter2.goingup.com/thumboo/image.php?i=1f899e4e1abf9473ccae69de4f3ec1ca|||wwww.google.com||||80x50

But, late, it shows a "URL not found" error. Does anyone know what carefree went with this API?

Is there any other such convenient third-party API that can help me. Conveniently, I mean, it shouldn’t show the lame message A screenshot in the queue every time when it cannot find any preliminary snapshot for this website in its db.

+6
source share
2 answers

Use PhantomJS to take screenshots. PhantomJS comes with an example called rasterize.js that does just that. Example:

 phantomjs rasterize.js http://raphaeljs.com/polar-clock.html clock.png 

Docs are here . Related projects including web services here .

+5
source

http://snapit.io works well and gives you historical caching on CDN. For example, this URL will look like

fooobar.com/questions/900154 / ...

if you want to get a thumbnail size of 200x200 pixels (maintaining the aspect ratio), you could do

fooobar.com/questions/900154 / ...

There are many other services there, most of which require a subscription to any significant amount of use (including snapit.io), http://url2png.com , http://www.shrinktheweb.com , http://www.thumbalizr.com .

+2
source

Source: https://habr.com/ru/post/900154/


All Articles