diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-02 19:41:57 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-04-02 19:41:57 +0200 |
| commit | b9f7c421c2b05a2bde03d92852bcc9230f6841c7 (patch) | |
| tree | 960241ddf45dd37b37ddb7ede0c2e5c4bd780d36 | |
| parent | 8e3f0661d524c355748377e56150a827f59f543c (diff) | |
| download | apigrabber-b9f7c421c2b05a2bde03d92852bcc9230f6841c7.tar.gz apigrabber-b9f7c421c2b05a2bde03d92852bcc9230f6841c7.zip | |
finish early if num(matches) < 50 on a page
| -rw-r--r-- | worker.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -64,11 +64,11 @@ if (MADGLORY_TOKEN == undefined) throw "Need an API token"; } }) )); + if (matches.length < 50) exhausted = true; } catch (err) { if (err.statusCode == 429) { await sleep(1000); } else if (err.statusCode == 404) { - // TODO stop early if len(matches) < pagelen exhausted = true; } else { console.error(err); |
