When I try to get the src it returns None. The code should locate the image by its class name and get the attribute.
import selenium.webdriver as webdriver
import time
from selenium.webdriver.common.by import By
driver = webdriver.Firefox()
url = ('https://www.instagram.com/cats')
driver.get(url)
time.sleep(3)
imgs = driver.find_element(By.CLASS_NAME, "_aagv").get_attribute("src")
print(imgs)
driver.quit()
I tired to use it with for loop as well but the results were same None. Any suggestions how to get it working?
