You've seen it a thousand times: you paste a URL into Slack, Discord, or iMessage and it blooms into a tidy card with a title, an image, and a description. It's one of the highest-trust little UI elements you can add to a chat app, a comment box, a CMS, or a bookmarking tool. A bare URL looks like spam. An unfurled link looks legit — and gets clicked.
So you decide to build it. How hard can it be? You fetch the page, grab a few meta tags, done by lunch.
Then reality shows up.
What a link preview actually is
The card is built from Open Graph tags in the page's <head> :
<meta property= "og:title" content= "The Verge" /> <meta property= "og:description" content= "Technology, science and culture." /> <meta property= "og:image" content= "https://.../cover.png" /> ```
Read those, render a card. Simple — in the demo. The pain is everything *between* "fetch the page" and "read the tags."
## The five things that break your weekend scraper
1.…