Fix Selenium headless invokation (#106)

Co-authored-by: msramalho <19508417+msramalho@users.noreply.github.com>
This commit is contained in:
Galen Reich
2023-11-13 11:56:35 +01:00
committed by GitHub
parent 1382f8b795
commit 381940f5a8
3 changed files with 665 additions and 629 deletions

1289
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -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)