Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to get the link of an image in selenium python

from selenium import webdriver
from selenium.webdriver.common.by import By

image = driver.find_element(By.XPATH, value='//*[@id="app"]/div/div/div[2]/div[1]/div[1]/img')

print(image.get_attribute("scr"))
Comment

selenium python get image from url

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains

wait = WebDriverWait(browser, 20)
actions = ActionChains(browser)

product_img_xpath = '//div[contains(@class,"s-item")]//img'
wait.until(EC.visibility_of_element_located((By.XPATH, product_img_xpath)))
time.sleep(1)

imgs = browser.find_elements_by_xpath(product_img_xpath)
for img in imgs:
    actions.move_to_element(img).perform()
    print(img.get_attribute('src'))
Comment

PREVIOUS NEXT
Code Example
Python :: multiprocessing print does not work 
Python :: euclidean algorithm recursive python 
Python :: buttons on canvas tkinter 
Python :: python print without new lines 
Python :: pycountry 
Python :: python detect warning 
Python :: get last n in list python 
Python :: python to uppercase 
Python :: how to merge two pandas dataframes on a column 
Python :: how to replace the last character of a string in python 
Python :: python import graphviz 
Python :: right-left staircase python 
Python :: python pillow convert jpg to png 
Python :: merge 2 dataframes pythom 
Python :: get scipy version python 
Python :: soup itemprop 
Python :: select pandas by t dtype python 
Python :: root.iconbitmap 
Python :: find all indices of element in string python 
Python :: count elements in columns pandas 
Python :: print random integers 
Python :: find an index of an item in a list python 
Python :: python icon on task bar 
Python :: python custom exception 
Python :: pandas replace non numeric values with 0? 
Python :: python game example 
Python :: extract a column from a dataframe in python 
Python :: how to print a string in python 
Python :: pd df sample 
Python :: python get pixel 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =