ahhhhhhhhhhhhhhhh

This commit is contained in:
piair 2022-03-28 17:49:26 +02:00
parent ab875f5566
commit a4fc2aafa1
1 changed files with 5 additions and 5 deletions

10
V4.py
View File

@ -86,17 +86,17 @@ def FirefoxMobile(Headless = Headless):
def FirefoxPC(Headless = Headless): def FirefoxPC(Headless = Headless):
PC_USER_AGENT = ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' #PC_USER_AGENT = ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
'AppleWebKit/537.36 (KHTML, like Gecko) ' # 'AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134') # 'Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134')
#options.set_preference("general.useragent.override", PC_USER_AGENT)
options = Options() options = Options()
options.set_preference("browser.link.open_newwindow", 3) options.set_preference("browser.link.open_newwindow", 3)
if Headless : if Headless :
options.add_argument("-headless") options.add_argument("-headless")
options.set_preference("general.useragent.override", PC_USER_AGENT)
return(webdriver.Firefox(options=options)) return(webdriver.Firefox(options=options))