python - How to click a button by twill? -
i want go site , click on button or link logging in. login not use form.
i think login procedure use javascript.
input username:
<input tabindex="1" class="dxeeditarea_office2003blue dxeeditareasys" onkeydown="aspxekeydown('ctl00_wuclogin1_txtuid', event)" name="ctl00$wuclogin1$txtuid" onkeyup="aspxekeyup('ctl00_wuclogin1_txtuid', event)" type="text" id="ctl00_wuclogin1_txtuid_i" onblur="aspxelostfocus('ctl00_wuclogin1_txtuid')" onfocus="aspxegotfocus('ctl00_wuclogin1_txtuid')" onkeypress="aspxekeypress('ctl00_wuclogin1_txtuid', event)" style="height:15px;">
the link login :
<a id="ctl00_wuclogin1_btnlogin" class="search_button" href="javascript:__dopostback('ctl00$wuclogin1$btnlogin','')" style="...">login </a>
how can click on link , how can fill input username twill? there other alternative twill?
thanks,
try sending user-agent
header request. in case, twill doesn't handle javascript well, you're better off trying else.
for alternatives, there are:
- mechanize
- requests
- beautifulsoup (for parsing html)
- selenium (python bindings)
Comments
Post a Comment