Skip to content

Commit

Permalink
fix: update web image parsing path
Browse files Browse the repository at this point in the history
  • Loading branch information
HanaokaYuzu committed May 22, 2024
1 parent 499d87d commit 17523c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gemini_webapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,16 @@ async def generate_content(
candidates = []
for candidate in body[4]:
web_images = (
candidate[4]
candidate[12]
and candidate[12][1]
and [
WebImage(
url=image[0][0][0],
title=image[2],
title=image[7][0],
alt=image[0][4],
proxies=self.proxies,
)
for image in candidate[4]
for image in candidate[12][1]
]
or []
)
Expand Down

0 comments on commit 17523c2

Please sign in to comment.