Open chrysb opened 3 years ago
Thanks for the report. I will add it to investigation needed.
Just tried the library again and found it also doesn't work for Spotify urls:
Example: https://open.spotify.com/artist/39ywlwtGw8RTGobakgb11L?si=As8Ynf-RS12yFu8jckzhYQ
Just tried the library again and found it also doesn't work for Spotify urls:
Example: https://open.spotify.com/artist/39ywlwtGw8RTGobakgb11L?si=As8Ynf-RS12yFu8jckzhYQ
I spoke too soon. I updated from 3.2.0
to 3.3.0
and that Spotify URL worked. Hurrah!
The reason is that Apple news' OG:image doesn't have a file extension.
<meta property="og:image" content="https://c.apple.news/AgEXQWsySW9PRXA4UWRpNkpWczhwLUpqX0EAMA" /><meta name="twitter:card" content="summary_large_image" />
The supported imagePattern is
static let imagePattern = "(.+?)\\.(gif|jpg|jpeg|png|bmp)$"
Would it make sense to pass along the image URL regardless of extension? That would allow clients to try to parse the image and we can rely on iOS to examine the content headers and try to create UIImages from the URLs.
Any news on this one? Any way to ignore the imagePattern ?
Thanks for making this. Certainly saved me a lot of time!
Unfortunately, it doesn't seem to follow redirects.
Example: https://apple.news/Ak2IoOEp8Qdi6JVs8p-Jj_A
It should return the
og:image
from here: https://abcnews.go.com/Politics/capitol-breached-protesters/story?id=75081629The impact is that it does not return the image from the news article, but rather a big Apple News logo.