Skip to content

Commit

Permalink
Fix image network for Telegram images
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Oct 25, 2024
1 parent 96528d1 commit caf451a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions processors/networks/image-network.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def process(self):
file_url_map = {v["filename"]: u for u, v in metadata.items()}
for url, details in metadata.items():
for item_id in details.get("post_ids", []):
if self.source_dataset.type.endswith("-telegram"):
# telegram has weird IDs
item_id = "-".join(details["filename"].split("-")[:-1]) + "-" + str(item_id)
id_file_map[item_id] = details["filename"]

root_dataset = None
Expand Down

0 comments on commit caf451a

Please sign in to comment.