depreciation warnings 1

This commit is contained in:
piair 2021-12-23 16:45:57 +01:00
parent 0902251737
commit 8705597d9a
1 changed files with 3 additions and 8 deletions

11
V4.py
View File

@ -7,7 +7,7 @@ from os import path, sys, system
import discord import discord
import asyncio import asyncio
from sys import platform from sys import platform
from csv import reader from csv import reader
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.firefox.options import Options from selenium.webdriver.firefox.options import Options
@ -51,9 +51,7 @@ def FirefoxMobile(Headless = Headless):
if Headless : if Headless :
options.add_argument("-headless") options.add_argument("-headless")
MobileProfile = webdriver.FirefoxProfile() options.set_preference("general.useragent.override", MOBILE_USER_AGENT)
MobileProfile.set_preference("general.useragent.override", MOBILE_USER_AGENT)
options.profile = MobileProfile
return(webdriver.Firefox(options=options, service_log_path=os.devnull)) return(webdriver.Firefox(options=options, service_log_path=os.devnull))
@ -69,10 +67,7 @@ def FirefoxPC(Headless = Headless):
if Headless : if Headless :
options.add_argument("-headless") options.add_argument("-headless")
PcProfile = webdriver.FirefoxProfile() options.set_preference("general.useragent.override", PC_USER_AGENT)
PcProfile.set_preference("general.useragent.override", PC_USER_AGENT)
options.profile= PcProfile
return(webdriver.Firefox(options=options,service_log_path=os.devnull)) return(webdriver.Firefox(options=options,service_log_path=os.devnull))