skip translator results if [] or not http 200

This commit is contained in:
Bryan Bishop 2013-02-18 05:17:57 -06:00
parent 0253a0a9db
commit 56f0caf6ae
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ def download(phenny, input, verbose=True):
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
content = json.loads(response.content)
item = content[0]