Created
April 6, 2020 07:39
-
-
Save yaojenkuo/4eb5fc5e6bd879fe6294c04d3471ddeb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| request_url = "https://data.nba.net/10s/prod/v3/today.json" | |
| request_headers = { | |
| 'authority': "data.nba.net", | |
| 'method': "GET", | |
| 'path': "/10s/prod/v3/today.json", | |
| 'scheme': "https", | |
| 'accept': "application/json, text/plain, */*", | |
| 'accept-encoding': "gzip, deflate, br", | |
| 'accept-language': "en,en-US", | |
| 'origin': "https://www.nba.com", | |
| 'sec-fetch-dest': "empty", | |
| 'sec-fetch-mode': "cors", | |
| 'sec-fetch-site': "cross-site", | |
| 'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" | |
| } | |
| response = requests.get(request_url, headers=request_headers) | |
| print(type(response)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment