how to get the image hyperlink by using the selenium package.
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://m.imdb.com/feature/bornondate")
elements = driver.find_elements_by_xpath("//a[@class='poster ']")
li = [["Name","Movie Title","Image"]]
for i in elements:
print i.find_element_by_tag_name("img") ##I am not sure how to get the URL
new_line= i.text.splitlines()
#print new_line[0] , " " , new_line[1]
li.append(new_line)
print li
Writing the data to CSV file
with open ('imdb.csv','wb')as fp:
a = csv.writer(fp, delimiter=',')
a.writerows(li)
//a[@class='poster ']. In terms of HTML, this could just as well be<a class="poster">,<a class=" poster">or<a class=" poster ">. Better use a CSS selector:a.poster