diff --git a/V6.py b/V6.py index 0286bd8..7bb6d2d 100755 --- a/V6.py +++ b/V6.py @@ -9,7 +9,6 @@ from modules.db import add_to_database from modules.driver_tools import * from modules.error import * -from selenium.common.exceptions import NoSuchElementException # create a webdriver def create_driver(mobile=False): @@ -24,7 +23,7 @@ def create_driver(mobile=False): "Chrome/22 Mobile Safari/537.36" ) - chrome_profile_dir = init_profile(config.UserCredentials.get_mail()) + chrome_profile_dir = init_profile(config.UserCredentials.get_mail(), mobile=mobile) # Full list on https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md arguments = [ diff --git a/modules/driver_tools.py b/modules/driver_tools.py index e9be606..6cedb55 100644 --- a/modules/driver_tools.py +++ b/modules/driver_tools.py @@ -12,8 +12,12 @@ from modules.Tools.logger import debug from modules.Tools.tools import * -def init_profile(mail): - chrome_profile_dir = "/app/MsRewards-Reborn/user_data/profile/"+mail +def init_profile(mail, mobile=False): + if not mobile: + chrome_profile_dir = "/app/MsRewards-Reborn/user_data/profile/"+mail + else: + chrome_profile_dir = "/app/MsRewards-Reborn/user_data/profile/mobile-"+mail + os.makedirs(chrome_profile_dir, exist_ok=True) preferences_file = os.path.join(chrome_profile_dir, "Default", "Preferences") diff --git a/version b/version index 4f85350..fc325b3 100644 --- a/version +++ b/version @@ -1 +1 @@ -v6.8.45 +v6.8.46