Created
November 23, 2016 06:15
-
-
Save peterkodermac/48b837283a735310b3aa7619d89870a4 to your computer and use it in GitHub Desktop.
Windows authentication, web login with python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mechanize | |
import BeautifulSoup | |
import requests | |
from requests_ntlm import HttpNtlmAuth | |
from bs4 import BeautifulSoup | |
result=requests.get("www.url.com",auth=HttpNtlmAuth('domain\\username','password?')) | |
print result.content | |
soup=BeautifulSoup(result.content, "html.parser") | |
print result.content | |
print soup.find_all("h1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment