oembed-extractor icon indicating copy to clipboard operation
oembed-extractor copied to clipboard

No working oembed URLs

Open onigetoc opened this issue 1 year ago • 7 comments

Some work on some Oembed on node project lie (node-oembed), and some do not work from your's. This one work with:

  • https://www.npmjs.com/package/oembed

Not working with oembed-extractor:

  • https://stackblitz.com/edit/react-ykmowo-ducm9k?file=index.js
  • https://www.bitchute.com/video/8hXWnkvA8Ao/ (work with node-oembed)

for example: this one do not work with oembed but work on your's [oembed-extractor].

  • https://www.slideshare.net/ericschmidt/trillion-dollar-coach-book-bill-campbell
  • https://www.bitchute.com/video/8hXWnkvA8Ao/ (work with node-oembed).

With PHP i used this one and it's really good. May be your can be inspired to custom some to make many more to work. https://github.com/oscarotero/Embed/ I suggested him to add: Pinterest and some more. I customized some myself to add more providers with a embed service but without Oembed infos in the header. like - https://www.bitchute.com/video/8hXWnkvA8Ao/

Check for code or iframe:

  • https://oscarotero.com/embed3/demo/index.php?url=https://www.pinterest.ca/pin/755690012496368556/
  • https://oscarotero.com/embed3/demo/index.php?url=https://www.bitchute.com/video/8hXWnkvA8Ao/

onigetoc avatar Sep 18 '23 02:09 onigetoc

Thank you for your suggestion. My lib only focuses on the oembed api, and does not extract meta tag from the webpage, so it does not support something like twitter cards or open graph properties. But I may consider to implement that in the future.

ndaidong avatar Sep 18 '23 14:09 ndaidong

I may suggest adding the most important one like Facebook post, videos ect. These Facebook feeds have to be from accounts and page public with no sharing and view restriction. Published to all. To view to post only it's like Twitter, clicking the post time. https://developers.facebook.com/docs/plugins/embedded-posts/ https://developers.facebook.com/docs/plugins/embedded-video-player/

Twitter already work well.

I think if you find the right id it will work. But i think that some meta should be read like title, description ect. for Facebook there's something to modify if it's video post ect.

IFRAME:

Post: <iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2F20531316728%2Fposts%2F10154009990506729%2F&width=500&show_text=false&height=292&appId" width="500" height="292" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>

Video: <iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Ffacebook%2Fvideos%2F10153231379946729%2F&width=500&show_text=true&height=371&appId" width="500" height="371" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe>

The Oembed json file will have to be done reading the header meta i guest. I already did that in the past but in php.

UPDATE: I did some test and i think it may not work because with JavaScript you are not logged in. mmm.... May be with node... i don't know.

But my own php version give me this:

image

onigetoc avatar Sep 19 '23 02:09 onigetoc

With Facebook and Instagram, this lib requires to set app id and client token, as the doc here. I'm not sure that we can read these data without credentials.

ndaidong avatar Sep 19 '23 09:09 ndaidong

For Facebook, it will work with public post (My result confirm it work with php). I do not know if it will work with javascript and node.

Example from NBC SPORT: https://oscarotero.com/embed3/demo/index.php?url=https://www.facebook.com/NBCSports/videos/272467038989271/

Same with normal posts:

onigetoc avatar Sep 21 '23 23:09 onigetoc

@onigetoc what it showed is not oembed data but come from the webpage's meta tags. It find the oembed url but could not load the oembed without credentials.

Screenshot from 2023-09-22 10-09-46

My oembed-extractor follows oEmbed standard:

oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.

So I don't have plan to parse the meta data from target page. I may create another project for that purpose in the future and this lib can use that package as a dependency.

ndaidong avatar Sep 22 '23 03:09 ndaidong

Some other services would work without explicitly being added to the list of providers should you implement oEmbed's method of discovery. For example, that bitchute page has discoverable oEmbed data.

CorySanin avatar Jan 15 '24 18:01 CorySanin

@CorySanin yeah, this is a great suggestion.

ndaidong avatar Jan 22 '24 08:01 ndaidong