Last active
February 22, 2017 18:04
-
-
Save dannyOhNo/c0ce8922d72331879011f23ce0d40ecf to your computer and use it in GitHub Desktop.
Main Body
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
detected_apps = [] | |
for app in apps: | |
client_id = app.get('client_id') | |
name = app.get('name') | |
result_raw = make_request(client_id) | |
if result_raw.status_code == 200: | |
html_url = parse_response(result_raw.text) | |
if html_url: | |
detected_apps.append({ | |
"client_id": client_id, | |
"name": name, | |
"html_url": html_url | |
}) | |
elif result_raw.status_code == 403: | |
retry_after = int(result_raw.headers.get('Retry-After')) | |
time.sleep(retry_after) | |
parse_response(result_raw.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment