From 0d07dec19c1af5d96c482af73ba16996b0fd5c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 19 May 2025 16:43:12 +0200 Subject: [PATCH] [instagram:stories] fix 'post_date' metadata (#7521) --- gallery_dl/extractor/instagram.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gallery_dl/extractor/instagram.py b/gallery_dl/extractor/instagram.py index 0da44f92..624bba2d 100644 --- a/gallery_dl/extractor/instagram.py +++ b/gallery_dl/extractor/instagram.py @@ -165,13 +165,16 @@ class InstagramExtractor(Extractor): if "items" in post: # story or highlight items = post["items"] reel_id = str(post["id"]).rpartition(":")[2] + expires = post.get("expiring_at") data = { - "expires": text.parse_timestamp(post.get("expiring_at")), + "expires": text.parse_timestamp(expires), "post_id": reel_id, "post_shortcode": shortcode_from_id(reel_id), } if "title" in post: data["highlight_title"] = post["title"] + if expires and not post.get("seen"): + post["seen"] = expires - 86400 else: # regular image/video post data = {