Can we custom oembed provider with regexp


#1

like


Can not download oembed-parser in china
#2

@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.


#3

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:


#4

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

fallback to use oembed-parser

like: https://codex.wordpress.org/Function_Reference/wp_embed_register_handler


#5

I made a module in https://github.com/zce/embed-parser

compare link


#6

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.


#7

Thank you for your reply.


#8

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