How can i take screenshots of a website while using python requests?

Viewed 35

I currently scrape a website and take a screenshot when a certain case happens. I want to consume less bandwidth so im trying to do it via Requests. I cant figure out how will i take screenshots but i thought of a workaround which: Once the certain case happens - it will open chrome as usual - take screenshot - close chrome.

Any smarter way im not thinking about? Thanks!

1 Answers

Request is a library for making HTTP requests. You can't "take a screenshot" with it, it makes no sense.

Maybe try Selenium instead.

Related