Can we custom oembed provider with regexp

like

@zce embed providers are looked up via the official oembed providers.json list - if you know of a provider that’s not there you can submit it as a PR to that project. Ghost also fetches the URL that is provided to look for a <link rel="alternate" type="application/json+oembed"> tag which is another way for sites to advertise that they support oembed.

In China, most video sites offer Embed, but they don’t provide an api endpoint to get Embed.

But their embed url has specific rules, like:

In addition, getting embed urls through rules is more efficient and performance.

fallback to use oembed-parser

like: Function Reference/wp embed register handler « WordPress Codex

I made a module in GitHub - zce/embed-parser: A parser for get embed data from url

compare link

https://github.com/TryGhost/Ghost/compare/master...zce:embed-parser

Thanks @zce. I’ve added it to our internal backlog to investigate :slight_smile: It certainly sounds like a good way to augment our supported embed URLs.

Thank you for your reply.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.