Plug-in is broken with recent Mubi.com service
The mubi.com website slightly changed class attribute value for certain elements the plug-in was looking for in mubi.py:80
e.g. class=" app-play-film play-film" data-filmid="2280"
the two spaces were added, the program cannot handle it. I don't know python libs well enough to contribute a fix myself, besides expecting those exact extra spaces...
Exactly i just found that out they have some spaces probably a silly bug It happend some weeks ago but i didnt had time to check. I added: mubi_id = x.find('a', {"class": " app-play-film play-film"}).get("data-filmid") and fix the problem Thanks
Well spotted both,
Have just update the source and pushed it back to Git, although haven't yet had a chance to test it.
On 6 December 2015 at 21:04, Eduardo [email protected] wrote:
Exactly i just found that out they have some spaces probably a silly bug It happend some weeks ago but i didnt had time to check. I added: mubi_id = x.find('a', {"class": " app-play-film play-film"}).get("data-filmid") and fix the problem Thanks
— Reply to this email directly or view it on GitHub https://github.com/jamieu/plugin.video.mubi/issues/4#issuecomment-162347261 .
It's actually two spaces
Yes two spaces. I sent a mail to Mubi asking about the API, and basically they answer no API...
Hi Erkki/Eduardo,
Have pushed a two space version live, unfortunately I don't have a copy of Kodi to hand to test the changes, but hopefully it works.
Re. MUBI API, they do seem to have an (unpublished) internal API for their iPad/iPhone app (I did look into sniffing it / using it at one point but got bogged down with other stuff). But it's not public and I expect would be just as prone to unexpected changes as the website, although probably would be faster than scraping.
My guess is they want to keep the ability to change their API without having to deal with 3rd parties. Not to mention (rightly or wrongly) nervous distributors/sales agents feeling uneasy about doing deals with a platform that has a public API. From a business point of view I expect the ability to present MUBI as a closed platform to rights holders outweighs the benefits of providing a public API for developers to build against on other platforms. It also allows them to keep a degree of quality control / branding over their apps.
Jamie
On 8 December 2015 at 11:49, Eduardo [email protected] wrote:
Yes two spaces. I sent a mail to Mubi asking about the API, and basically they answer no API...
— Reply to this email directly or view it on GitHub https://github.com/jamieu/plugin.video.mubi/issues/4#issuecomment-162859791 .
Thanks for the fix!
PS. I had the idea that maybe the film id's could be found not by css class, but by presence of data-filmid attribute: mubi_id = x.find('a', {"data-filmid": True}).get("data-filmid") I don't really know Python well, so I hope this example is correct -- seemed to work for me.
PPS. Now another thing is broken again: the "Film of the day" is not showing up, because they have given it a completely different HTML structure (or was it always like this?). It seems like maybe they are working on the website and more changes are to be expected, but looks like they are adding structured data thingies like itemtype="http://schema.org/Movie", itemprop="name" etc. Or were these always there? If they are commited to that, perhaps this meta-data would actually provide a less brittle way of parsing? Not sure, currently it doesn't seem stable and it's still not consistent between "Film of the day" and other movies.