Search code examples
pythonseleniumsplinter

Saving an image using splinter python


I have an image in site and i want to save it to my computer but i cant find way. the html relevent code is:

<div class="rfloatL text-field">
   <img src="/register/tb135/tb_getimage.php?uid=1450109984&start=" title style:="border:1-x solid;">
</div>

i tried those :

link=browser.find_by_css('border')
print link
print link[0]
link=browser.find_link_by_partial_href('register/tb135')
print link
print link[0]
link=browser.find_link_by partial_href('tb135')
print link
print link[0]

and the exeption is "EkementDoesNotExist".


Solution

  • You can use find_by_tag("img") to get the img element.