Bitcoin Forum
November 04, 2024, 10:59:33 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I need a script to take screenshots of a webpage automatically (Python)  (Read 48 times)
thrillainvanilla (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
April 10, 2024, 10:12:23 AM
 #1

Can anyone help me with this? I had no idea it would be so nerve-racking. I tried using Selenium, but for some websites, those pop-ups and cookie banners are ruining it. Some screenshots are taken while the page is still loading; I end up having an empty space and a block of text/image missing. There are more and more pages I need to capture and I can't spend too much time trying to figure out each one separately.
Vod
Legendary
*
Offline Offline

Activity: 3878
Merit: 3166


Licking my boob since 1970


View Profile WWW
April 10, 2024, 10:20:44 AM
 #2

Can anyone help me with this? I had no idea it would be so nerve-racking. I tried using Selenium, but for some websites, those pop-ups and cookie banners are ruining it. Some screenshots are taken while the page is still loading; I end up having an empty space and a block of text/image missing. There are more and more pages I need to capture and I can't spend too much time trying to figure out each one separately.

https://www.google.com/search?q=python+web+scraping

I post for interest - not signature spam.
https://elon.report - new B.P.I.P. Reports!
https://vod.fan - fast/free image sharing - coming Nov
whatspopping
Jr. Member
*
Offline Offline

Activity: 34
Merit: 1


View Profile
April 10, 2024, 10:32:45 AM
 #3

I got to learn how knotty python screen capture can be. In some cases, using Selenium headlessly would give me better screenshots. A couple of other options you can test out are explained here in detail. Depends on a couple of factors if they will work in some specific cases, as always. It is still possible that you'll be struggling with pop-ups and cookie banners, plus all kinds of lurking issues if you need full-page screenshots.
thrillainvanilla (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
April 10, 2024, 10:44:40 AM
 #4

Thanks, guys, I appreciate it. I wasn't sure if I'll get any replies but I had to give it a shot. Off I go to look into these.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!