A
A
Alexander2021-10-31 19:30:31
css
Alexander, 2021-10-31 19:30:31

How to get a website image with HTML using python?

You need to get a photo of the site, having its code. Tried to search for information about it, but found nothing. All this needs to be done in python.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2021-10-31
@dariuz

Tried to search for information about it, but found nothing.

Decompose the task.
If you only have html code - then:
1. Install selenium
2. Save the code to a file - a normal write file operation
3. Open the saved file using selenium url file://path to the saved file
4. Using the .get_screenshot_as_png( ) - get a screenshot
About how to make any item from this list - there is a lot of information on the Internet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question