-
Notifications
You must be signed in to change notification settings - Fork 59
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
Library fails to parse google.com #69
Comments
Did you try different user agents? I.e.:
|
Thanks for the response @Iomegan, I did indeed try that beforehand but excluded it because I wanted to provide the simplest reproducible example. An API call that looks like this fails to return any metadata as well. let metadata = try await OpenGraph.fetch(
url: URL(string: "https://google.com")!,
headers: [
"User-Agent" : "facebookexternalhit/1.1",
"charset" : "UTF-8"
]
) Is there anything else I should try or consider? |
Hmm. With the header set I do get some metadata (on macOS with the network entitlement enabled) for youtube.com:
But now google only returns empty metadata.
I'm not sure why, but looks like an Open Graph bug to me. |
Hi @satoshi-takano, thank you so much for this library — I've been experimenting with it tonight and have found it very useful already! I'm testing out quite a few sites and noticed that OpenGraph fails to parse some bare domains like google.com and youtube.com.
I ran both of those through opengraph.xyz and they seem to work fine there.
https://www.opengraph.xyz/url/https%3A%2F%2Fgoogle.com
https://www.opengraph.xyz/url/https%3A%2F%2Fyoutube.com
The library though returns no metadata.
I was wondering if there was something I need to configure to get these domains to parse, or possibly even special-case considerations that would help them work right.
Thank you again, I'm very excited to continue integrating your library. 😄
The text was updated successfully, but these errors were encountered: