mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 18:41:50 +01:00
Fix custom profile handling
This commit is contained in:
@@ -275,6 +275,7 @@ class KleinanzeigenBot(SeleniumMixin):
|
|||||||
self.browser_config.binary_location = self.config["browser"]["binary_location"]
|
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.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.use_private_window = self.config["browser"]["use_private_window"]
|
||||||
|
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.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"]
|
self.browser_config.profile_name = self.config["browser"]["profile_name"]
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class SeleniumMixin:
|
|||||||
browser_options.add_argument(f"--user-data-dir={self.browser_config.user_data_dir}")
|
browser_options.add_argument(f"--user-data-dir={self.browser_config.user_data_dir}")
|
||||||
|
|
||||||
if self.browser_config.profile_name:
|
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(f"--profile-directory={self.browser_config.profile_name}")
|
||||||
|
|
||||||
browser_options.add_argument("--disable-crash-reporter")
|
browser_options.add_argument("--disable-crash-reporter")
|
||||||
|
|||||||
Reference in New Issue
Block a user