feat: support for shopping search in SerpApi (#5259)

# Support for shopping search in SerpApi

## Who can review?
@vowelparrot
This commit is contained in:
Aymen Furter 2023-05-28 06:20:24 +02:00 committed by GitHub
parent 1daa7068b2
commit e2742953a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,11 @@ class SerpAPIWrapper(BaseModel):
and "game_spotlight" in res["sports_results"].keys()
):
toret = res["sports_results"]["game_spotlight"]
elif (
"shopping_results" in res.keys()
and "title" in res["shopping_results"][0].keys()
):
toret = res["shopping_results"][:3]
elif (
"knowledge_graph" in res.keys()
and "description" in res["knowledge_graph"].keys()