From cc8a918cd55b735ac85e782b69489d2073ae1a73 Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Sun, 21 Jul 2024 11:49:53 +0200 Subject: [PATCH] browser size --- src/aliexpress.py | 7 ++++++- src/main.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/aliexpress.py b/src/aliexpress.py index f4d8edf..3a7b080 100644 --- a/src/aliexpress.py +++ b/src/aliexpress.py @@ -47,9 +47,12 @@ def check_item(settings_item): ##### to use with selenium firefox container + firefox_options = webdriver.FirefoxOptions() + firefox_options.add_argument("--width=2560") + firefox_options.add_argument("--height=1440") driver = webdriver.Remote( command_executor='http://127.0.0.1:4444', - options=webdriver.FirefoxOptions() + options=firefox_options ) ##### for testing with local geckodriver @@ -57,6 +60,8 @@ def check_item(settings_item): # service = webdriver.FirefoxService(executable_path='/bin/geckodriver') # profile = webdriver.FirefoxProfile() # options.profile = profile + # options.add_argument("--width=2560") + # options.add_argument("--height=1440") # driver = webdriver.Firefox(service=service, options=options) # load login cookies diff --git a/src/main.py b/src/main.py index 10bbc6a..6dac8dc 100644 --- a/src/main.py +++ b/src/main.py @@ -28,7 +28,10 @@ if __name__ == '__main__': # c_l = ["1005006062371246", ["Pr Tactile 62g x35"]] # print(check_item(c_l)) - c_l = ["1005005676358693", ["5x250mm 5pcs"]] + # c_l = ["1005005676358693", ["5x250mm 5pcs"]] + # print(check_item(c_l)) + + c_l = ["1005005512267841", ["Pr Linear 45g x110","Factory Lubed"]] print(check_item(c_l)) # c_l = ["1005005824413309", ["00350"]]