Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

fetch python

import requests

url = 'https://randomfox.ca/floof/'
r = requests.get(url)

print(r.status_code) # 200 (hopefully)

print(r.text) # { "image": "image.jpg", "link": "link.com" }
print(r.json()['image']) # e.g. https://randomfox.ca/images/78.jpg
 
PREVIOUS NEXT
Tagged: #fetch #python
ADD COMMENT
Topic
Name
8+4 =