diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-05 16:32:27 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-05 16:32:27 +0100 |
| commit | 462e1028f4ad27927e8dd439018927cb93859bb3 (patch) | |
| tree | 815310b9f7253b0d556529ab025886a49161f1a5 | |
| parent | 03c3a1983eab29f84e5ba4997c7c34b93d4b78c7 (diff) | |
| download | apigrabber-462e1028f4ad27927e8dd439018927cb93859bb3.tar.gz apigrabber-462e1028f4ad27927e8dd439018927cb93859bb3.zip | |
tolerate API json error
| -rw-r--r-- | crawler.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,6 @@ #!/usr/bin/python +import json import asyncio import logging import aiohttp @@ -46,7 +47,8 @@ class Crawler(object): except (aiohttp.errors.ContentEncodingError, aiohttp.errors.ServerDisconnectedError, aiohttp.errors.ClientResponseError, - aiohttp.errors.ClientOSError): + aiohttp.errors.ClientOSError, + json.decoder.JSONDecodeError): # API bug? logging.warning("API error, retrying") pass |
