depreciation warnings 1

This commit is contained in:
piair 2021-12-23 16:45:57 +01:00
parent 0902251737
commit 8705597d9a

9
V4.py
View File

@ -51,9 +51,7 @@ def FirefoxMobile(Headless = Headless):
if Headless :
options.add_argument("-headless")
MobileProfile = webdriver.FirefoxProfile()
MobileProfile.set_preference("general.useragent.override", MOBILE_USER_AGENT)
options.profile = MobileProfile
options.set_preference("general.useragent.override", MOBILE_USER_AGENT)
return(webdriver.Firefox(options=options, service_log_path=os.devnull))
@ -69,10 +67,7 @@ def FirefoxPC(Headless = Headless):
if Headless :
options.add_argument("-headless")
PcProfile = webdriver.FirefoxProfile()
PcProfile.set_preference("general.useragent.override", PC_USER_AGENT)
options.profile= PcProfile
options.set_preference("general.useragent.override", PC_USER_AGENT)
return(webdriver.Firefox(options=options,service_log_path=os.devnull))