[RELEASE] NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)
(2014-05-03, 15:26)ricardosunnie Wrote: That's not the case, I have only one Netflix profile and the problem is there. If this was the problem why would some list show up oke and others don't?

Because http://movies.netflix.com/WiHome requires a profile selection and the JSON extraction calls for latest and viewing history do not. I fiddled with the script to dump the "content" string it was receiving and found it to be the case. Cutting down to one profile predictably solved the problem. If you have only one profile and are still experiencing empty genres then you have an older problem that can be fixed by doing the following.

Open default.py and find the following under def listVideos:

Code:
...
            match1 = re.compile('<span id="dbs(.+?)_.+?alt=".+?" src="(.+?)"', re.DOTALL).findall(content)
            match2 = re.compile('<span class="title "><a id="b(.+?)_', re.DOTALL).findall(content)
...

Append this match3 below match1 and match2:

Code:
...
            match1 = re.compile('<span id="dbs(.+?)_.+?alt=".+?" src="(.+?)"', re.DOTALL).findall(content)
            match2 = re.compile('<span class="title "><a id="b(.+?)_', re.DOTALL).findall(content)
            match3 = re.compile('<img class="boxart" src="(.+?)" alt="(.+?)".+?/><a class="playHover" href=".+?WiPlayer\\?movieid=(.+?)&', re.DOTALL).findall(content)
...

Right below is an if/elif statement like so:

Code:
...
            if match1:
                for videoID, thumbUrl in match1:
                    listVideo(videoID, "", thumbUrl, False, False)
            elif match2:
                for videoID in match2:
                    listVideo(videoID, "", "", False, False)
...

Add the following elif to the end of it:

Code:
...
            if match1:
                for videoID, thumbUrl in match1:
                    listVideo(videoID, "", thumbUrl, False, False)
            elif match2:
                for videoID in match2:
                    listVideo(videoID, "", "", False, False)
            elif match3:
                for thumbUrl, vidTitle, videoID in match3:
                    listVideo(videoID, vidTitle, thumbUrl, False, False)
...

And that should correctly scrape a genre until Netflix decides to change their website again. It is still important to only have one Netflix profile (at least on Windows 7/Chrome) or these page requests will be answered with a "Who's watching now?" popup.
Reply


Messages In This Thread
Search empty? - by cgrey - 2014-01-11, 06:13
Not working on windows 7 - by dandiodati - 2014-02-26, 21:55
RE: [RELEASE] NetfliXBMC - Inofficial Netflix Add-on (Win/OSX/Linux) - by urashimakt - 2014-05-03, 18:29
Problems with this addon - by builderjer - 2014-11-30, 19:55
Logout Mark Read Team Forum Stats Members Help
[RELEASE] NetfliXBMC - Unofficial Netflix Add-on (Win/OSX/Linux)7