Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id="__AjaxAntiForgeryForm" action="#" method="post">
- <input name="__RequestVerificationToken" type="hidden" value="LOUesP09TLS3suKJk4dF5hIxeo-LmDWLxX8xqwIHYnj-JqR29qDcGA_mtHXvyZIej83qG3FfBBs2nuzk1EY6onTuszY1">
- </form>
- page = urllib2.urlopen(LOGIN_URL)
- # parse the html using beautiful soup and store in variable `soup`
- soup = BeautifulSoup(page, "html.parser")
- form = soup.find("form", {"id": "__AjaxAntiForgeryForm"})
- <form action="#" id="__AjaxAntiForgeryForm" method="post"><input name="__RequestVerificationToken" type="hidden" value="zd7XHXyVs7EgqObLzIfm9k4bw1cWfcddhfDZ9Mp8TibBaAJUz-yAp1ZBuKS1iJtEAvmI1WG_EYnbmXBnWzuKWJxfl8U1"/></form>
- form = soup.find("form", {"id": "__AjaxAntiForgeryForm"})['value']
Add Comment
Please, Sign In to add comment