adding gamechanger, in progress
This commit is contained in:
0
gamechanger/utils/__init__.py
Normal file
0
gamechanger/utils/__init__.py
Normal file
15
gamechanger/utils/gamechanger.py
Normal file
15
gamechanger/utils/gamechanger.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import requests
|
||||
import re
|
||||
import json
|
||||
|
||||
|
||||
|
||||
url = "https://gc.com/t/{season_id}/{team_id}/{page}"
|
||||
|
||||
def scrape_page(season_id, team_id, page):
|
||||
r=requests.get(url.format(season_id=season_id, team_id=team_id, page=page))
|
||||
j=initialize_page_json = re.search(r'page.initialize\(\$.parseJSON\("(.*?)"\)', r.content.decode('unicode_escape'))
|
||||
m=j.group(1)
|
||||
return json.loads(m)
|
||||
# d = scrape_page(season_id, team_id, page)
|
||||
pass
|
||||
Reference in New Issue
Block a user