![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
oembed-parser
Advanced tools
Extract eEmbed content from given URL.
npm install oembed-parser
import {
extract
} from 'oembed-parser'
const url = 'https://www.youtube.com/watch?v=8jPQjjsBbIc'
extract(url).then((oembed) => {
console.log(oembed)
}).catch((err) => {
console.trace(err)
})
Extract oEmbed data from specified url. Return: a Promise
Optional argument params
is an object with it we can set maxwidth
and/or maxheight
those are used to scale embed size to fit your container size. Please refer oEmbed/Full Spec/Consumer Request for more info.
Here is how we can use oembed-parser
in async/await style:
import {
extract
} from 'oembed-parser'
const getOembed = async (url) => {
try {
const oembed = await extract(url)
return oembed
} catch (err) {
console.trace(err)
}
}
const data = getOembed('your url')
console.log(data)
Return boolean. True if the URL matches with any provider in the list.
Return provider which is relevant to given URL.
For example:
import {
findProvider
} from 'oembed-parser'
findProvider('https://www.facebook.com/video.php?v=999999999')
// get something like below:
// {
// fetchEndpoint: 'https://graph.facebook.com/v10.0/oembed_video',
// providerName: 'Facebook',
// providerUrl: 'https://www.facebook.com/'
// }
Sets the list of providers to use, overriding the defaults.
This can be useful for whitelisting only certain providers, or for adding custom providers.
For the expected format, see the default list.
List of resource providers is a clone of oembed.com and available here.
Since October 24 2020, Facebook have deprecated their legacy urls and applied a new Facebook oEmbed endpoints.
Please update your oembed-parser
version to v1.4.2 or later to be able to extract oembed data from Instagram and Facebook.
Technically, now we have to use Facebook Graph API, with the access token from a valid and live Facebook app.
export FACEBOOK_APP_ID=your_app_id
export FACEBOOK_CLIENT_TOKEN=your_client_token
For more info, please refer:
git clone https://github.com/ndaidong/oembed-parser.git
cd oembed-parser
npm install
npm test
# quick evaluation
npm run eval {URL_TO_PARSE_OEMBED}
The MIT License (MIT)
FAQs
Get oEmbed data from given URL.
The npm package oembed-parser receives a total of 0 weekly downloads. As such, oembed-parser popularity was classified as not popular.
We found that oembed-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.