Repository navigation
fix(instagram): preview a copyright-blocked video with its cover frame - #14
Conversation
Instagram drops video_url from the embed of a copyright-blocked video, so the share link fell back to a 302 and Telegram showed no preview. The embed still carries the cover frame, author and caption, so render those as an image post instead. Blocked carousels and blocked videos without a cover frame still redirect to the original. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Problem
Share links for copyright-blocked Instagram reels (e.g.
/www.instagram.com/reel/Dey7uKIB2oP/) got no preview in Telegram. The embed page carriesWatchOnInstagramandcopyright_blocked: trueand has novideo_url, soparseEmbedreturnednulland the crawler was sent to instagram.com, which gives Telegram nothing.Change
parseEmbedturns a blockedGraphVideointo an image post built from the embed's cover frame (EmbeddedMediaImage), author and caption.WatchOnInstagramstill returnnulland 302.docs/spec/fail-open-to-original.mdnow lists the cover-frame fallback and the remaining failure signals.Verification
bun run checkpasses (629 tests).cf devlocally with a Telegram UA on the reported reel: the share link returned 200 withog:imagepointing at/media/Dey7uKIB2oP/1and noog:video./media/Dey7uKIB2oP/1returned 302 toscontent.cdninstagram.comwithno-store, and that image came back as 200image/jpeg.🤖 Generated with Claude Code
Summary by CodeRabbit