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
Post a Comment