mechanize를 사용하여 암호로 보호 된 사이트 인 way2sms에 액세스하려고합니다. 그런 다음이기계화를 사용하는 암호로 보호 된 사이트
<loginform POST http://site2.way2sms.com/content/index.html application/x-www-form-urlencoded
<IgnoreControl(button2=<None>)>
<TextControl(username=Mobile Number)>
<PasswordControl(password=******)>
<SubmitControl(button=Login) (readonly)>>
을 제공
는import mechanize
br = mechanize.Browser()
br.open('http://site2.way2sms.com/content/index.html')
for form in br.forms():
print form
내가 그랬어이
br.select_form(nr = 0)
br.form['username']= 'My mobile'
br.form['password'] = 'Password'
br.submit()
br.response().read()
이 로그인 한 후 페이지의 HTML을 제공하지만 어떻게 내가 로그인 전에 페이지를 얻을 수 있습니다. 수 누군가 도움이 되니?