Bitcoin Forum
June 21, 2024, 12:38:35 AM *
News: Latest Bitcoin Core release: 27.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 32 times)
thrillainvanilla (OP)
Newbie
*
Offline Offline

Activity: 13
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: 3738
Merit: 3099


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

https://nastyscam.com - featuring 13 years of OGNasty bitcoin scams     https://vod.fan - advanced image hosting - coming sooner than you think!
whatspopping
Newbie
*
Offline Offline

Activity: 26
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: 13
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!