Skip to content

Instantly share code, notes, and snippets.

@dannyOhNo
Last active February 22, 2017 18:04
Show Gist options
  • Save dannyOhNo/c0ce8922d72331879011f23ce0d40ecf to your computer and use it in GitHub Desktop.
Save dannyOhNo/c0ce8922d72331879011f23ce0d40ecf to your computer and use it in GitHub Desktop.
Main Body
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