We are very happy to announce that Disney has given us the exclusive opportunity to be the first to scrape their new platform Disney Plus. We are the first to bring the metadata to you from the new streaming platform!
Extracting information from a Disney Plus link
First of all, enter your profile and copy your token. You will need it for the following steps :-)
We will be making a GET request to the following API endpoint: https://api.opengraphr.com/v1/og
.
To make a request, you will need to include your api_token
and the requested url:
GET https://api.opengraphr.com/v1/og?api_token={YOUR_API_TOKEN}&url={YOUR_URL}
.
By default, our API will cache results for a month, but you can refresh the cache by sending the force=1
parameter:
GET https://api.opengraphr.com/v1/og?api_token={YOUR_API_TOKEN}&url={YOUR_URL}&force=1
.
Using our API to extract Disney Plus metadata
Once the GET request is sent, you will get a response like this from our API. In this case, we are requesting the following URL: https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE
{
"title": "Ver Aladd\u00edn | Pel\u00edcula completa | Disney+",
"description": "Aladd\u00edn, la princesa Jasm\u00edn y el genio unen sus fuerzas para parar al malvado Jafar.",
"image": "https:\/\/prod-ripcut-delivery.disney-plus.net\/v1\/variant\/disney\/EBC038D70FC34E4EBC849C16817DB1B26047B38E6E77A2C985CC73356BC879CA\/scale?width=1200&aspectRatio=1.78&format=jpeg",
"url": "https:\/\/www.disneyplus.com\/es-es\/movies\/aladdin\/2SngByljXESE",
"raw": {
"title": "Ver Aladd\u00edn | Pel\u00edcula completa | Disney+",
"metadescription": "Aladd\u00edn, la princesa Jasm\u00edn y el genio unen sus fuerzas para parar al malvado Jafar.",
"og_title": "Ver Aladd\u00edn | Pel\u00edcula completa | Disney+",
"twitter_title": "Ver Aladd\u00edn | Pel\u00edcula completa | Disney+",
"og_description": "Aladd\u00edn, la princesa Jasm\u00edn y el genio unen sus fuerzas para parar al malvado Jafar.",
"twitter_description": "Aladd\u00edn, la princesa Jasm\u00edn y el genio unen sus fuerzas para parar al malvado Jafar.",
"og_image": "https:\/\/prod-ripcut-delivery.disney-plus.net\/v1\/variant\/disney\/EBC038D70FC34E4EBC849C16817DB1B26047B38E6E77A2C985CC73356BC879CA\/scale?width=1200&aspectRatio=1.78&format=jpeg",
"twitter_image": "https:\/\/prod-ripcut-delivery.disney-plus.net\/v1\/variant\/disney\/EBC038D70FC34E4EBC849C16817DB1B26047B38E6E77A2C985CC73356BC879CA\/scale?width=1200&aspectRatio=1.78&format=jpeg",
"og_url": "https:\/\/www.disneyplus.com\/es-es\/movies\/aladdin\/2SngByljXESE",
"twitter_url": "https:\/\/www.disneyplus.com\/es-es\/movies\/aladdin\/2SngByljXESE",
"og_type": "website",
"twitter_card": "summary"
}
}
And that's it! Easy, right? Now let's see some examples of how to implement this using actual code!
Extract Disney Plus information using PHP
You can easily get the Open Graph information of a given Disney Plus link by using the following script in PHP:
$token = 'YOUR_TOKEN';
$url = 'https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE';
$requestUrl = 'https://api.opengraphr.com/v1/og?api_token=' . $token . '&url=' . urlencode($url);
$response = json_decode(file_get_contents($requestUrl), true);
var_dump($response);
Extract Disney Plus information using JavaScript
You can easily get the Open Graph information of a given Disney Plus URL by using the following script in plain JS:
const token = 'YOUR_TOKEN'
const url = 'https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE'
const requestUrl = `https://api.opengraphr.com/v1/og?api_token=${token}&url=${encodeURIComponent(url)}`
fetch(requestUrl)
.then(response => response.json())
.then(og => {
console.table(og)
})
Extract Disney Plus information using NodeJS
You can easily get the Open Graph information of a given Disney Plus URL by using the following script in NodeJS:
const axios = require('axios')
const express = require('express')
const app = express()
const token = 'YOUR_TOKEN'
app.get('/site/info', async (req, res) => {
const { url } = req.query
const requestUrl = 'https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE'
const response = await axios.get(requestUrl, {
params: {
url,
api_token: token,
// force: 1,
},
})
const og = response.data
res.json(og)
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
Extract Disney Plus information using C-Sharp
You can easily get the Open Graph information of a given Disney Plus URL by using the following script in C#:
using System;
using System.Net;
using System.IO;
using Newtonsoft.Json;
namespace CSharpDemo
{
class MainClass
{
public static void Main (string[] args)
{
var token = 'YOUR_TOKEN';
var url = 'https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE';
var urlEncoded = Uri.EscapeDataString(url);
var requestUrl = "https://api.opengraphr.com/api/og?api_token=" + token + "&url=" + urlEncoded;
var request = WebRequest.Create(requestUrl);
request.ContentType = "application/json;";
string text;
var response = (HttpWebResponse)request.GetResponse();
using (var sr = new StreamReader(response.GetResponseStream()))
{
text = sr.ReadToEnd();
dynamic og = JsonConvert.DeserializeObject(text);
Console.WriteLine("Title\t\t" + og.title);
Console.WriteLine("Description\t" + og.description);
Console.WriteLine("Image\t\t" + og.image);
}
}
}
}
Extract Disney Plus information using Python
You can easily get the Open Graph information of a given Disney Plus URL by using the following script in Python:
import requests
TOKEN = 'YOUR_TOKEN'
url = 'https://www.disneyplus.com/es-es/movies/aladdin/2SngByljXESE'
endpoint = 'https://api.opengraphr.com/api/og'
response = requests.get(endpoint, params={ 'url': url, 'api_token': TOKEN }).json()
print(response)