This commit is contained in:
Edward Betts 2019-09-29 21:37:17 +01:00
parent 42b78da7e3
commit 3d63b6f9f6

4
app.py
View file

@ -321,7 +321,7 @@ def oauth_api_request(params):
client_secret=client_secret,
resource_owner_key=session['owner_key'],
resource_owner_secret=session['owner_secret'])
r = oauth.get(url)
r = oauth.get(url, timeout=2)
reply = r.json()
return reply
@ -349,7 +349,7 @@ def get_token():
'format': 'json',
'formatversion': 2,
}
reply = oauth_api_request(params, timeout=2)
reply = oauth_api_request(params)
token = reply['query']['tokens']['csrftoken']
return token