Skip to content

Instantly share code, notes, and snippets.

@pawlos
Created July 7, 2024 09:15
Show Gist options
  • Save pawlos/e3685afc84ecf651d5b9a70ebb4dfa2d to your computer and use it in GitHub Desktop.
Save pawlos/e3685afc84ecf651d5b9a70ebb4dfa2d to your computer and use it in GitHub Desktop.
Take a screenshot of /repozytoria subpage of 100commitow.pl
#!/bin/env python3
import selenium.webdriver.firefox.service
from selenium import webdriver
import os
import psycopg2
from datetime import *
from time import sleep, time
# Set webdriver path
srv = selenium.webdriver.firefox.service.Service()
srv.path = "/snap/bin/geckodriver"
options = selenium.webdriver.firefox.options.Options()
driver = webdriver.Firefox(service=srv, options=options)
driver.maximize_window()
driver.get("https://100commitow.pl/repozytoria")
sleep(30)
driver.save_screenshot(f'_tmp/100commitow_{time()}.png')
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment