Created
April 12, 2014 16:41
-
-
Save philgruneich/10545034 to your computer and use it in GitHub Desktop.
Logs into GLB2 and grabs the HOF source code.
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 requests | |
from bs4 import BeautifulSoup as bs | |
login = { | |
'action': 'login', | |
'user_name':'your username', | |
'password':'your password' | |
} | |
with requests.Session() as c: | |
c.post('http://glb2.warriorgeneral.com/game/login', data=login) | |
r = c.get('http://glb2.warriorgeneral.com/game/hof?season=3&type=off_data&position=WR&league_id=0&tier=All') | |
soup = bs(r.content) | |
print(soup.prettify()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment