Skip to content

Instantly share code, notes, and snippets.

@p3t3r67x0
Created June 28, 2018 17:19
Show Gist options
  • Save p3t3r67x0/6eee8ca60e1bb9618b0dd7ae680709fc to your computer and use it in GitHub Desktop.
Save p3t3r67x0/6eee8ca60e1bb9618b0dd7ae680709fc to your computer and use it in GitHub Desktop.
#!/bin/bash/env python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
driver = webdriver.Firefox()
driver.get("https://www.flipkart.com/search?q=xbox&marketplace=FLIPKART&sid=search.flipkart.com")
elem = driver.find_elements_by_xpath('//img[contains(@class, "_30XEf0")]')
for element in elem:
print element.get_attribute('src')
print element.get_attribute('class')
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment