OpenGraph
OpenGraph copied to clipboard
Missing description on Twitter links
The description is missing from twitter/x urls but other fields like title/image are present.
let url = URL(string: "https://x.com/twostraws/status/1800359616330826099")!
let og = try! await OpenGraph.fetch(url: url, headers: ["User-Agent": "facebookexternalhit/1.1"])
print(og![.description]) //nil
I tracked down the issue to the regular expression in OpenGraphParser.swift failing.
the meta tag string is properly extracted but it's content is not:
Printing description of metaTag:
"<meta content=\"Meeting so many folks at #WWDC24 is so much fun, and a real highlight of my year. I love seeing the projects you’re working on, and I love hearing your feedback on my work and Apple’s SDKs, but please:\n\n- Tell me your name \n- Don’t post spy shot photos of me\n\nThank you! 🙇♂️\" property=\"og:description\" />"