Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Limit number of results to send
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrevinnoc committed Feb 13, 2021
1 parent 721bead commit 8d39ad0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions future.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,11 @@ def answer(query: str, page: int) -> jsonify:
escapeHTMLString(DBPediaDef),
"corrected":
escapeHTMLString(query),
"urls": bigListOfUrls
"urls": bigListOfUrls[:15]
}
else:
return {
"urls": bigListOfUrls
"urls": bigListOfUrls[:15]
}


Expand Down Expand Up @@ -472,11 +472,11 @@ def answerImages(query: str, page: int) -> jsonify:
registerQueryInAnalytics(query)
return {
"corrected": escapeHTMLString(query),
"images": bigListOfImages
"images": bigListOfImages[:15]
}
else:
return {
"images": bigListOfImages
"images": bigListOfImages[:15]
}


Expand Down

0 comments on commit 8d39ad0

Please sign in to comment.