web scraping - Get login result in mechanize (Python) -


i'm logging in website (https://acesso.estadao.com.br/login/) using:

 br.select_form(id="form-cadastro")  br['emaillog'] = login  br['passwordlog'] = passwd  br.submit()  answer = br.response().read() 

and works good, after need know if login successful or not, how can it? tried read answer, either a:

<script type="text/javascript"> window.location.hash = ''; window.location.href = "http://www.estadao.com.br/" </script> 

or

<!doctype html> <html lang="pt-br"> <head> <meta charset="utf-8"/> <meta http-equiv="x-ua-compatible" content="ie=edge"/> <title>o portal de not&iacute;cias estado de s. paulo</title> (...) 

is there way of getting response code, saying login ok?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -