Skip to content

Commit

Permalink
imdb score
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Sep 15, 2023
1 parent 1e8580d commit 4eefdea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 70 deletions.
7 changes: 3 additions & 4 deletions justWatchTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ async function getMovieInfo(movieTitle) {
const response = await fetch(encodeURI(url));
const data = await response.json();
// console.log(data);
const loc = data.items[0].full_path;
const opts = { url: `https://www.justwatch.com${loc}` };
// console.log(opts);
const justWatchURL = "https://www.justwatch.com" + data.items[0].full_path;
console.log(data.items[0].scoring);
// console.log(data.items[0].offers.filter((x) => x.monetization_type != "flatrate" && x.monetization_type != "rent" && x.monetization_type != "buy"));
console.log(data.items[0].offers.filter((x) => x.monetization_type == "flatrate" && (x.package_short_name == "amp" || x.package_short_name == "nfx" || x.package_short_name == "dnp")));
// console.log(data.items[0].offers.filter((x) => x.monetization_type == "flatrate" && (x.package_short_name == "amp" || x.package_short_name == "nfx" || x.package_short_name == "dnp")));
}

// let movieTitle = "The Thousand Years of Longing";
Expand Down
79 changes: 13 additions & 66 deletions test.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,15 @@
[
{
jw_entity_id: 'tm912189',
monetization_type: 'flatrate',
provider_id: 337,
package_short_name: 'dnp',
currency: 'USD',
urls: {
standard_web: 'https://disneyplus.bn5x.net/c/1206980/705874/9358?u=https%3A%2F%2Fwww.disneyplus.com%2Fmovies%2Felemental%2F1B2ZQ9GF35W5&subId3=justappsvod',
deeplink_web: 'https://www.disneyplus.com/video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_android_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_fire_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_tvos: 'disneyplus://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5',
deeplink_tizenos: '{"id":"MCmYXNxgcu.DisneyPlus","action_data":"{\\"page\\": \\"movie_details\\", \\"type\\": \\"movies\\", \\"id\\": \\"1B2ZQ9GF35W5\\", \\"pid\\": \\"SmartHubPub\\"}"}',
deeplink_webos: '{ "id": "com.disney.disneyplus-prod", "params": { "contentTarget": "" }}',
deeplink_xbox: 'disneyplus://video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_rokuos: 'launch/291097?contentID=e3895d1d-a979-4c1a-ba66-1bf706e145ab&MediaType=movie'
},
available_from: '0001-01-01T00:00:00Z',
available_to: '0001-01-01T00:00:00Z',
presentation_type: '4k',
country: 'US'
},
{
jw_entity_id: 'tm912189',
monetization_type: 'flatrate',
provider_id: 337,
package_short_name: 'dnp',
currency: 'USD',
urls: {
standard_web: 'https://disneyplus.bn5x.net/c/1206980/705874/9358?u=https%3A%2F%2Fwww.disneyplus.com%2Fmovies%2Felemental%2F1B2ZQ9GF35W5&subId3=justappsvod',
deeplink_web: 'https://www.disneyplus.com/video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_android_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_fire_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_tvos: 'disneyplus://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5',
deeplink_tizenos: '{"id":"MCmYXNxgcu.DisneyPlus","action_data":"{\\"page\\": \\"movie_details\\", \\"type\\": \\"movies\\", \\"id\\": \\"1B2ZQ9GF35W5\\", \\"pid\\": \\"SmartHubPub\\"}"}',
deeplink_webos: '{ "id": "com.disney.disneyplus-prod", "params": { "contentTarget": "" }}',
deeplink_xbox: 'disneyplus://video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_rokuos: 'launch/291097?contentID=e3895d1d-a979-4c1a-ba66-1bf706e145ab&MediaType=movie'
},
available_from: '0001-01-01T00:00:00Z',
available_to: '0001-01-01T00:00:00Z',
presentation_type: 'hd',
country: 'US'
},
{
jw_entity_id: 'tm912189',
monetization_type: 'flatrate',
provider_id: 337,
package_short_name: 'dnp',
currency: 'USD',
urls: {
standard_web: 'https://disneyplus.bn5x.net/c/1206980/705874/9358?u=https%3A%2F%2Fwww.disneyplus.com%2Fmovies%2Felemental%2F1B2ZQ9GF35W5&subId3=justappsvod',
deeplink_web: 'https://www.disneyplus.com/video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_android_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_fire_tv: 'intent://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5#Intent;launchFlags=0x00800000;scheme=https;end',
deeplink_tvos: 'disneyplus://www.disneyplus.com/movies/elemental/1B2ZQ9GF35W5',
deeplink_tizenos: '{"id":"MCmYXNxgcu.DisneyPlus","action_data":"{\\"page\\": \\"movie_details\\", \\"type\\": \\"movies\\", \\"id\\": \\"1B2ZQ9GF35W5\\", \\"pid\\": \\"SmartHubPub\\"}"}',
deeplink_webos: '{ "id": "com.disney.disneyplus-prod", "params": { "contentTarget": "" }}',
deeplink_xbox: 'disneyplus://video/e3895d1d-a979-4c1a-ba66-1bf706e145ab',
deeplink_rokuos: 'launch/291097?contentID=e3895d1d-a979-4c1a-ba66-1bf706e145ab&MediaType=movie'
},
available_from: '0001-01-01T00:00:00Z',
available_to: '0001-01-01T00:00:00Z',
presentation_type: 'sd',
country: 'US'
}
{ "provider_type": "imdb:score", "value": 7 },
{ "provider_type": "tmdb:id", "value": 976573 },
{ "provider_type": "tmdb:votes", "value": 1963 },
{ "provider_type": "jw:trending_7_day", "value": 577.31 },
{ "provider_type": "tmdb:popularity", "value": 1153.497 },
{ "provider_type": "imdb:multiplied", "value": 354137 },
{ "provider_type": "jw:popular_7_day", "value": 577.19 },
{ "provider_type": "jw:popular_180_day", "value": 257.07 },
{ "provider_type": "jw:viral", "value": 0.17 },
{ "provider_type": "jw:popular_30_day", "value": 608.47 },
{ "provider_type": "jw:popular_1_day", "value": 772.15 },
{ "provider_type": "tmdb:score", "value": 7.788 },
{ "provider_type": "imdb:votes", "value": 50591 }
]

0 comments on commit 4eefdea

Please sign in to comment.