[instagram] provide 'post_url' for stories and highlights (#7810)

fixes regression introduced in 25c63deebf
This commit is contained in:
Mike Fährmann
2025-07-12 17:30:06 +02:00
parent 98895b732f
commit 518c771e21

View File

@@ -165,10 +165,15 @@ class InstagramExtractor(Extractor):
items = post["items"]
reel_id = str(post["id"]).rpartition(":")[2]
expires = post.get("expiring_at")
if expires:
post_url = f"{self.root}/stories/{post['user']['username']}/"
else:
post_url = f"{self.root}/stories/highlights/{reel_id}/"
data = {
"expires": text.parse_timestamp(expires),
"post_id": reel_id,
"post_shortcode": shortcode_from_id(reel_id),
"post_url": post_url,
}
if "title" in post:
data["highlight_title"] = post["title"]