Skip to content

Instantly share code, notes, and snippets.

@reedy
Last active May 16, 2018 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reedy/21e4c4541b0a365172b5b0b98784045e to your computer and use it in GitHub Desktop.
Save reedy/21e4c4541b0a365172b5b0b98784045e to your computer and use it in GitHub Desktop.
import json
import requests
d = 0
for x in range(0, 114):
response = requests.request(
"GET",
"https://api.rebrandly.com/v1/links?apikey=<apikey>&offset=%d&orderBy=createdAt&orderDir=desc&" % (d)
).json()
d += 100
with open ("file1.txt", "a") as output:
output.write(str(response))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment