mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
Fix custom profile handling
This commit is contained in:
@@ -275,7 +275,8 @@ class KleinanzeigenBot(SeleniumMixin):
|
||||
self.browser_config.binary_location = self.config["browser"]["binary_location"]
|
||||
self.browser_config.extensions = [abspath(item, relative_to = self.config_file_path) for item in self.config["browser"]["extensions"]]
|
||||
self.browser_config.use_private_window = self.config["browser"]["use_private_window"]
|
||||
self.browser_config.user_data_dir = abspath(self.config["browser"]["user_data_dir"], relative_to = self.config_file_path)
|
||||
if self.config["browser"]["user_data_dir"]:
|
||||
self.browser_config.user_data_dir = abspath(self.config["browser"]["user_data_dir"], relative_to = self.config_file_path)
|
||||
self.browser_config.profile_name = self.config["browser"]["profile_name"]
|
||||
|
||||
def login(self) -> None:
|
||||
|
||||
@@ -62,6 +62,7 @@ class SeleniumMixin:
|
||||
browser_options.add_argument(f"--user-data-dir={self.browser_config.user_data_dir}")
|
||||
|
||||
if self.browser_config.profile_name:
|
||||
LOG.info(" -> Browser Profile Name: %s", self.browser_config.profile_name)
|
||||
browser_options.add_argument(f"--profile-directory={self.browser_config.profile_name}")
|
||||
|
||||
browser_options.add_argument("--disable-crash-reporter")
|
||||
|
||||
Reference in New Issue
Block a user