Is there a way to get a screenshot of the block (for example, there is a certain div on the page) only through the code?
There are libraries that take screenshots when the browser is running. But I need to get a picture by sending a request from the server. That is something that will run the code as if in a browser and make a screenshot.
I have a link to the document https://site.ru/files/index.html
And the selector. .div_block_preview
Having this data, how can I get a preview image on the server? (it is desirable to choose another type of browser)