summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKapil Viren Ahuja <kvahuja@users.noreply.github.com>2017-02-25 19:17:30 +0530
committerGitHub <noreply@github.com>2017-02-25 19:17:30 +0530
commitbfcab5cd701b955a7a15c0bb8b8de458e1a0baa5 (patch)
tree6444ccd51a0243e33d5afa00724f4efbb9bdd130
parent6dc7103c862119d269393f73bca493efbc720a10 (diff)
parentabda06d91c8a99c4ceca27ab4bc6ed8b20eab5c7 (diff)
downloadapigrabber-bfcab5cd701b955a7a15c0bb8b8de458e1a0baa5.tar.gz
apigrabber-bfcab5cd701b955a7a15c0bb8b8de458e1a0baa5.zip
Merge pull request #37 from vainglorygame/ratelimit
update limits: cannot get more than 5 random matches
-rw-r--r--crawler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawler.py b/crawler.py
index 0146586..e22c09f 100644
--- a/crawler.py
+++ b/crawler.py
@@ -12,7 +12,7 @@ class Crawler(object):
"""Sets constants."""
self._apiurl = APIURL
self._token = token
- self._pagelimit = 50
+ self._pagelimit = 5
async def _req(self, session, path, params=None):
"""Sends an API request and returns the response dict.
@@ -88,7 +88,7 @@ class Crawler(object):
data += res["data"] + res["included"]
- if len(res["data"]) < 50:
+ if len(res["data"]) < self._pagelimit:
# asked for 50, got less -> exhausted
break