This commit is contained in:
Aevann1 2021-09-19 15:11:34 +02:00
parent cf71ca6b0e
commit 99eb6ae9c0
22 changed files with 219 additions and 219 deletions

View file

@ -11,8 +11,8 @@ GIPHY_KEY = environ.get('GIPHY_KEY').rstrip()
@app.route("/giphy<path>", methods=["GET"])
def giphy(path=None):
searchTerm = request.args.get("searchTerm", "")
limit = int(request.args.get("limit", 48))
searchTerm = request.values.get("searchTerm", "")
limit = int(request.values.get("limit", 48))
if searchTerm and limit:
url = f"https://api.giphy.com/v1/gifs/search?q={searchTerm}&api_key={GIPHY_KEY}&limit={limit}"
elif searchTerm and not limit: