OFDB.bundle: v2 of odfb.de breaks the old bundle ... new one is being tested

Hi guys,

recently, ofdb.de changed their layout to v2 which breaks the plex agent OFDB.bundle.

I changed the agent in a way that it works again for movies.

Right now, it only works for movies that don’t have a special character in the movie name… any such character breaks the code (ä, ö, ü, ß, :, '…).
This is due to a change in their search method.
Before, you could search for an IMDB id in their general search and got a list of matches (one, or none). The agent could read the link and (at least in my version properly re-encode it to open the movie page and other pages for plot and age ratings).

Now, I changed it to a direct IMDB id search which automatically forwards to the movie page. But for pages with “special characters” in it, python throws an error without the agent being able to properly re-encode the URL (since it is a direct redirection done by the odf.de web service).

Once I fixed that problem, I will share the new bundle with any interested soul.

If somebody is interested to help me fixing it:

here’s the problem:

And we are looking for a way to python-workaround the direct re-direct in a search for IMDB ids.

PM if you think you can help, pls.

Oh, and I already know that the end of the world is near. :wink:

Well, I am into something here… maybe some kind soul can help to do the Python 2.7 code for checking the following…

This is the OFDB example of Matrix.

https://www.ofdb.de/quicksearch.php?term=tt0133093

It does not return a web page but a JSON object or array reply which contains the link to the movie page:

[{"aufrufe":0,"value":"Matrix","category":"Titel","cover":".\/images\/film.185px\/0\/154.jpg","url":"https:\/\/www.ofdb.de\/film\/154,Matrix\/","reviews":"42","fassungen":"62"}]

If you enter a non existent IMDB ID (or one to a movie not lreferenced within OFDB), the array reply is empty "[ ]".

Never did that in python.

  • step A: call that URL with the actual IMDB ID
  • step B: check if object/array is empty, return if empty
  • step C: if non-empty, check for the first entry and if “URL” field of the first entry is there and is of the type “…www.ofdb.de/film/…”
  • step D if not, return, but if test is successful…
  • step E: cut the trailing part (starting from the last “,” within the URL) from the URL string.
  • step F: use that as a movie page (did that already from here on)

Any kind python programmer soul that can help here?

Thread can be closed. New version of OFDB.bundle has been released.