Created
May 19, 2021 16:39
-
-
Save hughpearse/7cf00a40c2669da7dbf49ffa1646ee0c to your computer and use it in GitHub Desktop.
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 | |
import json | |
headers = {'Accept': 'application/json', 'User-Agent': 'Hugh'} | |
url = "https://reddit.com/r/worldnews.json" | |
r = requests.get(url, headers=headers) | |
print(r.json()['data']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment