Capturing name in source page using xpath in python -


i have following url source page:

<input type="hidden" name="qqq" value="aaa" /> <input type="hidden" name="www" value="bbb" /> <input type="hidden" name="eee" value="ccc" /> <input type="hidden" name="wanted" value="ddd" />    

i want extract wanted value ddd that. tried is:

token=tree.xpath('//input[@type="hidden"]/input[@value="ddd"]/@name') 

but gives me qqq

try xpath:

//input[@type='hidden'][@value='ddd']/@name 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -