Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@philgruneich
Created April 12, 2014 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philgruneich/10545034 to your computer and use it in GitHub Desktop.
Save philgruneich/10545034 to your computer and use it in GitHub Desktop.
Logs into GLB2 and grabs the HOF source code.
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