From 3bdeec1d2f3f17b8cd36ecf28a92a81a65a00e6f Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 30 Mar 2022 11:05:31 +0200 Subject: [PATCH] fix deprecation warning for selenium --- archivers/telethon_archiver.py | 1 - auto_archive.py | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/archivers/telethon_archiver.py b/archivers/telethon_archiver.py index f7ee53e..13b2a87 100644 --- a/archivers/telethon_archiver.py +++ b/archivers/telethon_archiver.py @@ -2,7 +2,6 @@ import os import re import html from dataclasses import dataclass -from urllib.parse import urlparse from loguru import logger from storages import Storage diff --git a/auto_archive.py b/auto_archive.py index fea9bfb..d3db9a2 100644 --- a/auto_archive.py +++ b/auto_archive.py @@ -78,10 +78,9 @@ def process_sheet(sheet, header=1, columns=GWorksheet.COLUMN_NAMES): options = webdriver.FirefoxOptions() options.headless = True - profile = webdriver.FirefoxProfile() - profile.set_preference('network.protocol-handler.external.tg', False) + options.set_preference('network.protocol-handler.external.tg', False) - driver = webdriver.Firefox(profile, options=options) + driver = webdriver.Firefox(options=options) driver.set_window_size(1400, 2000) driver.set_page_load_timeout(10)