From da0082713e0135bdabee36abff5469e94eeea558 Mon Sep 17 00:00:00 2001 From: tanshendong2023 <148203723+tanshendong2023@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:44:59 +0800 Subject: [PATCH 1/2] Update crawler.py --- mdgo/forcefield/crawler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdgo/forcefield/crawler.py b/mdgo/forcefield/crawler.py index cad3e2c7..d4b8ddb7 100644 --- a/mdgo/forcefield/crawler.py +++ b/mdgo/forcefield/crawler.py @@ -28,6 +28,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.chrome.service import Service from mdgo.util.dict_utils import lmp_mass_to_name @@ -87,7 +88,7 @@ def __init__( if chromedriver_dir is None: self.web = webdriver.Chrome(options=self.options) else: - self.web = webdriver.Chrome(chromedriver_dir, options=self.options) + self.web = webdriver.Chrome(service=Service(chromedriver_dir), options=self.options) self.wait = WebDriverWait(self.web, 10) self.web.get("http://zarbi.chem.yale.edu/ligpargen/") time.sleep(1) From 1655402d8576916ee7f626cb236560c37ac99cd4 Mon Sep 17 00:00:00 2001 From: Tingzheng Hou <25351437+htz1992213@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:12:32 +0800 Subject: [PATCH 2/2] keep align with pubchem.py --- mdgo/forcefield/crawler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mdgo/forcefield/crawler.py b/mdgo/forcefield/crawler.py index d4b8ddb7..7b2fc5ac 100644 --- a/mdgo/forcefield/crawler.py +++ b/mdgo/forcefield/crawler.py @@ -28,7 +28,6 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.chrome.service import Service from mdgo.util.dict_utils import lmp_mass_to_name @@ -74,6 +73,7 @@ def __init__( "profile.managed_default_content_settings.images": 2, } self.options = webdriver.ChromeOptions() + self.server = webdriver.ChromeService(chromedriver_dir) self.options.add_argument( 'user-agent="Mozilla/5.0 ' "(Macintosh; Intel Mac OS X 10_14_6) " @@ -88,7 +88,7 @@ def __init__( if chromedriver_dir is None: self.web = webdriver.Chrome(options=self.options) else: - self.web = webdriver.Chrome(service=Service(chromedriver_dir), options=self.options) + self.web = webdriver.Chrome(service=self.server, options=self.options) self.wait = WebDriverWait(self.web, 10) self.web.get("http://zarbi.chem.yale.edu/ligpargen/") time.sleep(1)