fixing json error
This commit is contained in:
@@ -821,7 +821,10 @@ def get_userid(access_token):
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
me_json = response.json()
|
me_json = response.json()
|
||||||
|
except JSONDecodeError:
|
||||||
|
return 0
|
||||||
try:
|
try:
|
||||||
res = me_json['data']['id']
|
res = me_json['data']['id']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
Reference in New Issue
Block a user