Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ee8939

Browse files
authored
Merge pull request #592 from amydosomething/fix/cover-photo-container-keyerror
fix: handle missing container key in cover photo metadata and undefined photos/reviews variables
2 parents e8b0669 + 11b845b commit 5ee8939

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

ghunt/modules/email.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ async def hunt(as_client: httpx.AsyncClient, email_address: str, json_file: Path
146146
"profile": target,
147147
"play_games": player if player_results else None,
148148
"maps": {
149-
"photos": photos,
150-
"reviews": reviews,
149+
"photos": None,
150+
"reviews": None,
151151
"stats": stats
152152
},
153153
"calendar": {

ghunt/parsers/people.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ async def _scrape(self, as_client: httpx.AsyncClient, person_data: Dict[str, any
161161
for cover_photo_data in person_data["coverPhoto"]:
162162
person_cover_photo = PersonPhoto()
163163
await person_cover_photo._scrape(as_client, cover_photo_data, "cover_photo")
164-
self.coverPhotos[cover_photo_data["metadata"]["container"]] = person_cover_photo
164+
container = cover_photo_data.get("metadata", {}).get("container", "unknown")
165+
self.coverPhotos[container] = person_cover_photo
165166

166167
if (apps_data := person_data.get("inAppReachability")):
167168
containers_names = set()

0 commit comments

Comments
 (0)