web scraping - Python login a website and scrap -
i need login following website using python, aim scrape page once logged in. not wish install web browser, needs happen shell. have tried splinter, requires installation of web client...
this website link
https://www.my.commbank.com.au/netbank/logon/logon.aspx
and source code of page
.... <div class="ft"> <div class="row"> <div class="labelwrapper labeltextalignnotset align_notset"> <label for="txtmyclientnumber_field" id="txtmyclientnumber_label"><span class="mainlabel ">client number</span></label> </div><div class="fieldelement "> <input name="txtmyclientnumber$field" value="xxxx5050" maxlength="8" id="txtmyclientnumber_field" class="text textbox field" data-maxlength="8" type="text"> </div> </div> <div class="row"> <div class="labelwrapper labeltextalignnotset align_notset"> <label for="txtmypassword_field" id="txtmypassword_label"><span class="mainlabel ">password</span></label> </div><div class="fieldelement "> <input name="txtmypassword$field" maxlength="16" id="txtmypassword_field" class="text textbox field" data-maxlength="16" type="password"> </div> </div> <div class="row"> <div class="fieldelement fieldelementnolabel"> <span class="checkbox field checkbox_classic"><input id="chkremember_field" name="chkremember$field" checked="checked" class="checkbox" type="checkbox"><label for="chkremember_field">remember client number</label></span> </div> </div> <input value="a%3d1374655030258%3bm%3d-660*-600%3bf%3d2560k1440k24%3bz%3d74%3bc%3d4%3bb%3dznpvagry%3by%3dra-hf%3bs%3d1%3bw%3d11%2cuggcf%253n//pon.qrzqrk.arg/rirag%253sq_afvq%253q0%2526q_yq%253q_gf%25253q1374655029179%2526p_cntranzr%253qao%25253nybtba%25253nybtba%2526p_punaary%253qao%25253nybtba%25253nybtba%2526p_cebc1%253qao%25253nybtba%2526p_cebc2%253qao%2526p_cebc7%253q6%25253n30cz%2526p_rine7%253q6%25253n30cz%2526p_cebc8%253qjrqarfqnl%2526p_rine8%253qjrqarfqnl%2526p_cebc9%253qjrrxqnl%2526p_rine9%253qjrrxqnl%2526p_rine12%253qqverpg%2526p_rine21%253qao%2526p_rine25%253qargonax%2526p_rine29%253qqverpg%2526p_cebc41%253qarg0006%2526p_rine42%253qao%25253nybtba%25253nybtba%2526p_cebc55%253qao%25253nybtba%25253nybtba%2526q_egoq%253qwfba%2526q_wfbai%253q1%2526q_qfg%253q1%2526q_pgf%253q1%2526q_po%253qqrzqrkerdhrfgpnyyonpx1374655029179%2cq91057nr72327302%2c96n91s93qqp26117%2c07822285229q55p0%2crnn7pp7p19323853%2c%2c93585po36p66947r%2c%2c51q81786895s4s8r%2c%2c541843r4s3s042o9%3bv%3d12%2c6qs311s0n255nqp3%2c11r31r0806ns7308%2c4qrp893o3q7s99n0%2cpp02p1sr22817o6p%2c3o67p115p8sn7o75%2c2p284056oqo1onr4%2c80363q72nq5rnors%2c11sr371752rpq18s%2c6q765r40ros8oo4p%2c9opn3pn87s2135qo%2c289366rq9spnq31s%2c95s92o2s0po53054%3be%3d15587%3b" name="perfmonlog" id="perfmonlog" type="hidden"> <div class="fieldelement fieldelementnolabel"> <div class="cbabutton " id="btnlogon"> <input class="button field" name="btnlogon$field" value="log on" id="btnlogon_field" type="submit"> </div> </div> ...
you can use tool mechanize this.
Comments
Post a Comment