Since find_element_by_tag_name and find_element_by_class_name has been depreciated in Selenium.
And change default value chromedriver in argumen parser
Updates to Bing image scraper for better compatibility and usability.
š Key Changes
š ļø Removed default path for the ChromeDriver, now it must be specified manually.
āØ Introduced the use of Service from selenium.webdriver.chrome.service for initializing ChromeDriver.
šļø Replaced deprecated method find_element_by_tag_name with find_element.
š Replaced deprecated code for finding elements by class name with updated By.CLASS_NAME method.
šÆ Purpose & Impact
šØ Purpose: These changes are intended to improve the robustness of the script, make the code compliant with the current best practices for Selenium usage, and prevent issues related to default paths and outdated methods.
š Impact: Users now need to provide their own path to ChromeDriver, which adds a step to the setup process but also gives them more control. The update ensures compatibility with the latest versions of Selenium, enhancing maintainability and future-proofing the tool.
Since find_element_by_tag_name and find_element_by_class_name has been depreciated in Selenium. And change default value chromedriver in argumen parser
I have updated bing_scraper.py, Please review.
Source: Official Documentation Link Stackoverflow
Thank you!
I have read the CLA Document and I sign the CLA
š ļø PR Summary
Made with ā¤ļø by Ultralytics Actions
š Summary
Updates to Bing image scraper for better compatibility and usability.
š Key Changes
Service
fromselenium.webdriver.chrome.service
for initializing ChromeDriver.find_element_by_tag_name
withfind_element
.By.CLASS_NAME
method.šÆ Purpose & Impact