JustWatchAPI icon indicating copy to clipboard operation
JustWatchAPI copied to clipboard

API Deprecated?

Open eayin2 opened this issue 7 years ago • 5 comments

On JustWatch.com website "Planet Earth" is listed as available on Netflix, see: https://www.justwatch.com/us/tv-show/planet-earth

Whereas using JustWatchAPI "Planet Earth" doesn't list Netflix as offer.

Looks like the data retrieved from the API is not the same as on JustWatch,com?

eayin2 avatar May 31 '18 17:05 eayin2

It is in there, but you'll need to do a bit more digging to get to the data you're after.

An initial search for Planet Earth does get you back that netflix is an offer (provider_id = 8) but all you can get from that is that there's "1 Season" and not which one.

To get the rest of the data, you need to

  • Call .get_title with the title id and content_type='show'
  • Look at key 'seasons' for more data
  • Make a call to 'https://apis.justwatch.com/content/titles/show_season/{}/locale/en_US' with {} = each 'id' you find in the 'seasons' element

I'll attach what I've done to get to this. There's a simple addition that can be made to the api to add the show_season function I've used as a sample. However it would probably be better to add another function that takes the title id and pulls back all the season data in one go.

draogn avatar Jun 01 '18 17:06 draogn

This was probably a bit big to put in a comment. It's in markdown but I've had to change to .txt to upload. issue13investigation.txt

draogn avatar Jun 01 '18 17:06 draogn

And here's the jupyter notebook issue13investigation.ipynb.zip

draogn avatar Jun 01 '18 17:06 draogn

Now it might have been a good idea for me to have looked at the outstanding pull request #12 from @GeneralAardvark which implements this.... @dawoudt can you approve that one, and I can add something that pulls back all the seasons in one go?

draogn avatar Jun 01 '18 18:06 draogn

Going down that root with Planet Earth, i thought that the web_ids might be the video_ids but thats not correct. I am not able to retrieve the video_id for the given episode

https://apis.justwatch.com/content/titles/show_season/21223/locale/de_DE

Json object checked against provider-id 8 (for netflix) object > eposidoes > {} > offers > {} > urls > standard_web

I'll recieve 2 Urls ( 1 for the sd match & 1 for the hd match, both are equal though ) http://www.netflix.com/title/70219642

When using aboves URL in a browser, i am being redirected (on play) to the proper video_id which https://www.netflix.com/watch/70207859

Corsscheck with Kodi Netflix Addon (German | locale DE_de) confirms correct video_id season_id=70065292 & video_id=70207859

So the issue remains, to recieve the correct video_id for a Episode!

Philps avatar Mar 08 '19 08:03 Philps