Import selenium directly
from selenium import webdriver
After opening the webpage through the following two ways
To identify the ID to obtain the desired object
driver.find_element_by_id("user_account") driver.find_element_by_xpath("//*[@ id='imgObj']")
After obtaining the object, use the
get_attribute method to get other attributes of the object
This method can also be used to get pictures in batches
It is definitely more convenient and convenient to compare regular expressions to take pictures and then recognize src.
The selenium documentation only talks about how to locate, but it doesn’t explain how to take other elements after positioning.