diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-27 19:17:43 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-02-27 19:17:43 +0100 |
| commit | 66fce36a48bd58d50dec61b996ee5cc4ae6cdc6e (patch) | |
| tree | 3cc36389691c94677fc62f945336f390dd6c1bb7 /crawler.py | |
| parent | 229deee940f555b904973dbd6b01529cdcd19419 (diff) | |
| download | apigrabber-66fce36a48bd58d50dec61b996ee5cc4ae6cdc6e.tar.gz apigrabber-66fce36a48bd58d50dec61b996ee5cc4ae6cdc6e.zip | |
don't fail with 404 if a player was found
Diffstat (limited to 'crawler.py')
| -rw-r--r-- | crawler.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -71,6 +71,11 @@ class Crawler(object): if "errors" in res: logging.warn("API returned error: '%s'", res["errors"]) + if res["errors"][0].get("title") == "Not Found" \ + and params["page[offset]"] > 0: + # a query returned exactly 50 matches + # which is expected, so don't fail. + return raise ApiError(res["errors"]) yield res |
