gotta try this on live.

This commit is contained in:
Jason Schwarzenberger
2020-12-02 13:22:47 +13:00
parent 32f1455bbb
commit 59c6f17e67
6 changed files with 17 additions and 13 deletions
+2 -2
View File
@@ -67,9 +67,9 @@ def put_story(story):
logging.error('Problem putting MeiliSearch story: {}'.format(str(e)))
return False
def search(q):
def search(q, skip=0, limit=250):
try:
params = dict(q=q, limit=250)
params = dict(q=q, skip=skip, limit=limit)
r = requests.get(MEILI_URL + 'indexes/qotnews/search', params=params, timeout=2)
if r.status_code != 200:
raise Exception('Bad response code ' + str(r.status_code))