Fix Selenium headless invokation (#106)

Co-authored-by: msramalho <19508417+msramalho@users.noreply.github.com>
pull/110/head
Galen Reich 2023-11-13 11:56:35 +01:00 zatwierdzone przez GitHub
rodzic 1382f8b795
commit 381940f5a8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 665 dodań i 629 usunięć

1289
Pipfile.lock wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -65,6 +65,9 @@ class UrlUtil:
if "vk.com/images/" in url: return False
if "vk.com/images/reaction/" in url: return False
# wikipedia
if "wikipedia.org/static" in url: return False
return True
@staticmethod

Wyświetl plik

@ -15,7 +15,7 @@ class Webdriver:
def __enter__(self) -> webdriver:
options = webdriver.FirefoxOptions()
options.headless = True
options.add_argument("--headless")
options.set_preference('network.protocol-handler.external.tg', False)
try:
self.driver = webdriver.Firefox(options=options)