skip translator results if [] or not http 200
This commit is contained in:
parent
0253a0a9db
commit
56f0caf6ae
@ -64,7 +64,7 @@ def download(phenny, input, verbose=True):
|
|||||||
|
|
||||||
response = requests.post(translation_url, data=data, headers=headers)
|
response = requests.post(translation_url, data=data, headers=headers)
|
||||||
|
|
||||||
if response.status_code == 200:
|
if response.status_code == 200 and response.content != "[]":
|
||||||
# see if there are any attachments
|
# see if there are any attachments
|
||||||
content = json.loads(response.content)
|
content = json.loads(response.content)
|
||||||
item = content[0]
|
item = content[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user