Obtenez les demandes de Python
import requests
response = requests.get('<api-endpoint>')
response.raise_for_status()
data = response.json()
print(data)
Tejas Naik
import requests
response = requests.get('<api-endpoint>')
response.raise_for_status()
data = response.json()
print(data)
# pip install requests
import requests
req = requests.get('<url here>', 'html.parser')
print(req.text)
import requests
r = requests.get('https://api.github.com', auth=('user', 'pass'))
print r.status_code
print r.headers['content-type']