plugin.video.netflix icon indicating copy to clipboard operation
plugin.video.netflix copied to clipboard

WebsiteParsingError

Open M95D opened this issue 1 year ago • 6 comments

Netflix add-on version

1.12.14

Operative systems used

LibreELEC

Kodi version used

Kodi 18 (Leia)

Description of the bug

Hi. 2 days ago I couldn't open Netflix anymore. It also failed on my browsers with a browser version error. I could fix it by updating this piece of code with new version strings:

    chrome_version = 'Chrome/125.0.0.0'
    base = 'Mozilla/5.0 '
    base += '%PL% '
    base += 'AppleWebKit/537.36 (KHTML, like Gecko) '
    base += '%CH_VER% Safari/537.36'.replace('%CH_VER%', chrome_version)

    if system in ['osx', 'ios', 'tvos']:
        return base.replace('%PL%', '(Macintosh; Intel Mac OS X 10_15_5)')
    if system in ['windows', 'uwp']:
        return base.replace('%PL%', '(Windows NT 10.0; Win64; x64)')
    # ARM based Linux
    if get_machine().startswith('arm'):
        # Last number is the platform version of Chrome OS
        return base.replace('%PL%', '(X11; CrOS x86_64 14541.0.0)')
    # x86 Linux
    return base.replace('%PL%', '(X11; Linux x86_64)')

But after this, there was a key error. I tried to generate a new auth key and login, but there's a new error: "WebsiteParsingError: E-mail field not found". I'm unable to fix this one. Please help. I know that this version is old, but I can't update. LibreELEC v10+ is broken in so many ways...

Steps to reproduce the behavior

No response

Debug log - mandatory

https://paste.kodi.tv/ajoledoxed.kodi

Possible fix

No response

Additional context

No response

Screenshots

No response

M95D avatar Jun 27 '24 16:06 M95D

As a workaround, I hardcoded my email address in resources/lib/services/nfsession/session/access.py, after the failed regex match and it works once again.

M95D avatar Jun 28 '24 20:06 M95D

I had the same issue (same versions of Kodi and add-on) and @M95D workaround works well. Not ideal indeed, but it works!

vcrocher avatar Jul 18 '24 11:07 vcrocher

I have the same issue for over a week now and am pretty much lost. Could you @M95D or @vcrocher therefore please explain for noobs how to hardcode one's email address exactly? Cheers.

dunno101 avatar Jul 19 '24 09:07 dunno101

Edit resources/lib/services/nfsession/session/access.py in the netflix plugin directory. Search for this line: # Get the account e-mail. After that, there's a email = ... line. Replace that with your email address in simple quotes: email = '[email protected]'

You probably also need to update version strings from resources/lib/common/device_utils.py - see my first post.

Remember to do a reboot after you edit the files.

M95D avatar Jul 21 '24 16:07 M95D

Unfortunately I posted too quickly: editing the access.py file and setting the email in clear in two places in it does allow me to log in and browse the Netflix content but this still fails to play anything. A new error (wrong password/email) shows up when trying to play. So, the fix doesn't work for me. Maybe @M95D have managed to get it work fully? I would be curious of the details of the process too.

vcrocher avatar Jul 26 '24 01:07 vcrocher

Probably also related: #1689 It feels like things have moved around since then.

paulvt avatar Aug 09 '24 07:08 paulvt

Hello. I need help please and thank you. Trying to get Netflix to work just payed for subscription and this is giving me websiteparsingerror please help 😢

Peelpolicerapedme avatar Nov 09 '24 03:11 Peelpolicerapedme

I a different error, using a fresh new auth key:

2024-11-18 15:13:13.159 T:588     error <general>: [plugin.video.netflix (0)] IPC callback raised exception: Unable to extract reactContext
2024-11-18 15:13:13.164 T:588     error <general>: [plugin.video.netflix (0)] Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/website.py", line 282, in extract_json
                                                       json_str = json_array[0]
                                                   IndexError: list index out of range
                                                   
                                                   The above exception was the direct cause of the following exception:
                                                   
                                                   Traceback (most recent call last):
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/common/ipc.py", line 172, in return_call
                                                       result = _call(self._func, _data)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/common/ipc.py", line 185, in _call
                                                       return func(**data)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/logging.py", line 139, in timing_wrapper
                                                       return func(*args, **kwargs)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/services/nfsession/session/access.py", line 112, in login_auth_data
                                                       website.extract_session_data(self.get('browse'), validate=True, update_profiles=True)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/logging.py", line 139, in timing_wrapper
                                                       return func(*args, **kwargs)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/website.py", line 72, in extract_session_data
                                                       react_context = extract_json(content, 'reactContext')
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/logging.py", line 139, in timing_wrapper
                                                       return func(*args, **kwargs)
                                                     File "/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils/website.py", line 300, in extract_json
                                                       raise WebsiteParsingError(f'Unable to extract {name}') from exc
                                                   resources.lib.common.exceptions.WebsiteParsingError: Unable to extract reactContext

BoboTiG avatar Nov 18 '24 15:11 BoboTiG

My daughter was able to login and watch video with her subscription after I applied the following fix https://github.com/biocoder-frodo/plugin.video.netflix/commit/f31989d013d32e04de495703152d35523f07

biocoder-frodo avatar Dec 01 '24 15:12 biocoder-frodo

I got the problem WebsiteParsingError: Unable to extract reactContext. yesterday it worked well, but now nothing is working anymore.

Box: RPI3 Libreelec 12.0.2 (amv7) Kodi Nexus.

Could you please reopen this case?

homebrew-hgp avatar Apr 12 '25 10:04 homebrew-hgp

No, it's a different issue.

M95D avatar Apr 13 '25 17:04 M95D

Thanks for your fast Response, but i get this Problem every day, two Times today...It seams to be a Login time issue...So when Logintime ist outdated, the App/kodibox has to logout and relogin, with the generated key File, Pin and Web Account Passwort, then it works for a time...And then the Same prosess again...I sended the KODi logs to Liebreelec...Regards,Helder Am 13.04.2025 19:23 schrieb Marius Dinu @.***>: Closed #1706 as completed.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

homebrew-hgp avatar Apr 13 '25 19:04 homebrew-hgp