Last active
May 16, 2018 12:27
-
-
Save reedy/21e4c4541b0a365172b5b0b98784045e 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 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