Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing description on Twitter links #76

Open
f0enix opened this issue Sep 19, 2024 · 0 comments
Open

Missing description on Twitter links #76

f0enix opened this issue Sep 19, 2024 · 0 comments

Comments

@f0enix
Copy link

f0enix commented Sep 19, 2024

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\" />"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant