Привет, я пытаюсь получить Twitter следующий список с этим кодом:
import mechanize
u = "https://mobile.twitter.com/login"
br = mechanize.Browser()
br.set_handle_equiv(True)
br.set_handle_gzip(True)
br.set_handle_redirect(True)
br.set_handle_referer(True)
br.set_handle_robots(False)
br.open(u)
br.select_form(nr=0)
br["session[username_or_email]"] = 'myusername'
br["session[password]"] = 'password'
br.submit()
u = "https://twitter.com/myusername/following"
br.open(u)
h = (br.response().read())
h= h.decode("utf-8", errors="ignore")
print(h)
, но я не получаю ответ, я ожидаю, это ответ:
<body>
<noscript>
<center>
If you’re not redirected soon, please <a href="/myusername/">use this link</a>.
</center>
</noscript>
<script nonce="bVaerlhg3shgP1zVFxg==">
document.cookie = "app_shell_visited=1;path=/;max-age=5"; location.replace(location.href.split("#")[0]);
</script>
</body>
почему браузер не go на следующей странице?