From 8705597d9aca41d09d81ce2e1114b89f6106cba8 Mon Sep 17 00:00:00 2001 From: piair Date: Thu, 23 Dec 2021 16:45:57 +0100 Subject: [PATCH] depreciation warnings 1 --- V4.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/V4.py b/V4.py index 13b9e0d..75955a5 100644 --- a/V4.py +++ b/V4.py @@ -7,7 +7,7 @@ from os import path, sys, system import discord import asyncio from sys import platform -from csv import reader +from csv import reader from selenium import webdriver from selenium.webdriver.firefox.options import Options @@ -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))