Created
July 7, 2024 09:15
-
-
Save pawlos/e3685afc84ecf651d5b9a70ebb4dfa2d to your computer and use it in GitHub Desktop.
Take a screenshot of /repozytoria subpage of 100commitow.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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