mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Enable ruff S113 rule (#11375)
* Enable ruff S113 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -11,7 +11,7 @@ def get_gifs(query: str, api_key: str = giphy_api_key) -> list:
|
||||
"""
|
||||
formatted_query = "+".join(query.split())
|
||||
url = f"https://api.giphy.com/v1/gifs/search?q={formatted_query}&api_key={api_key}"
|
||||
gifs = requests.get(url).json()["data"]
|
||||
gifs = requests.get(url, timeout=10).json()["data"]
|
||||
return [gif["url"] for gif in gifs]
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user