From fe3b0d3b7bc64856a2056840bee0e3e9ebf082b5 Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Mon, 15 Apr 2024 14:40:27 +0200 Subject: [PATCH 1/4] [msl_utils] Updated manifest endpoint --- resources/lib/services/nfsession/msl/msl_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lib/services/nfsession/msl/msl_utils.py b/resources/lib/services/nfsession/msl/msl_utils.py index 123d081a9..b200932cf 100644 --- a/resources/lib/services/nfsession/msl/msl_utils.py +++ b/resources/lib/services/nfsession/msl/msl_utils.py @@ -28,7 +28,7 @@ ENDPOINTS = { 'manifest_v1': CHROME_BASE_URL + 'pbo_manifests/%5E1.0.0/router', # "pbo_manifests/^1.0.0/router" - 'manifest': CHROME_PLAYAPI_URL + 'licensedmanifest', + 'manifest': CHROME_PLAYAPI_URL + 'licensedmanifest/1', 'license': CHROME_BASE_URL + 'pbo_licenses/%5E1.0.0/router', 'events': CHROME_PLAYAPI_URL + 'event/1', 'logblobs': CHROME_PLAYAPI_URL + 'logblob/1' From 7944699525d69ebd84a766b8b0fe6476dfb966cd Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Mon, 15 Apr 2024 15:10:17 +0200 Subject: [PATCH 2/4] [session] updated page to get email its backward compatible with old account interface --- resources/lib/services/nfsession/session/access.py | 4 ++-- resources/lib/services/nfsession/session/endpoints.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/services/nfsession/session/access.py b/resources/lib/services/nfsession/session/access.py index 4a16ddd3d..fe44cb0ef 100644 --- a/resources/lib/services/nfsession/session/access.py +++ b/resources/lib/services/nfsession/session/access.py @@ -122,8 +122,8 @@ def login_auth_data(self, data=None, password=None): 'If you have just done "Sign out of all devices" from Netflix account settings ' 'wait about 10 minutes before generating a new AuthKey.') from exc # Get the account e-mail - page_response = self.get('your_account').decode('utf-8') - email_match = re.search(r'account-email[^<]+>([^<]+@[^([^<]+@[^ Date: Mon, 15 Apr 2024 16:16:57 +0200 Subject: [PATCH 3/4] [infolabels] workaround for missing arts Recently request paths data for images such as: boxarts, interestingMoment, artWorkByType, storyArt sometime website dont return the data hoping this in future will be fixed on website we request also itemSummary data to get the boxArt value as fallback --- resources/lib/kodi/infolabels.py | 6 ++++-- resources/lib/utils/api_paths.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/lib/kodi/infolabels.py b/resources/lib/kodi/infolabels.py index 8299b8f23..f6ec0c387 100644 --- a/resources/lib/kodi/infolabels.py +++ b/resources/lib/kodi/infolabels.py @@ -252,18 +252,20 @@ def parse_art(videoid, item): paths.ART_PARTIAL_PATHS[2] + ['url'], item) fanart = common.get_path_safe( paths.ART_PARTIAL_PATHS[3] + [0, 'url'], item) + fallback = common.get_path_safe(['itemSummary', 'value', 'boxArt', 'url'], item) return _assign_art(videoid, boxart_large=boxarts.get(paths.ART_SIZE_FHD), boxart_small=boxarts.get(paths.ART_SIZE_SD), poster=boxarts.get(paths.ART_SIZE_POSTER), interesting_moment=interesting_moment.get(paths.ART_SIZE_FHD), clearlogo=clearlogo, - fanart=fanart) + fanart=fanart, + fallback=fallback) def _assign_art(videoid, **kwargs): """Assign the art available from Netflix to appropriate Kodi art""" - art = {'poster': _best_art([kwargs['poster']]), + art = {'poster': _best_art([kwargs['poster'], kwargs['fallback']]), 'fanart': _best_art([kwargs['fanart'], kwargs['interesting_moment'], kwargs['boxart_large'], diff --git a/resources/lib/utils/api_paths.py b/resources/lib/utils/api_paths.py index 762c66261..77645712f 100644 --- a/resources/lib/utils/api_paths.py +++ b/resources/lib/utils/api_paths.py @@ -51,7 +51,7 @@ [['requestId', 'summary', 'title', 'synopsis', 'regularSynopsis', 'evidence', 'queue', 'inRemindMeList', 'episodeCount', 'info', 'maturity', 'runtime', 'seasonCount', 'availability', 'trackIds', 'releaseYear', 'userRating', 'numSeasonsLabel', 'bookmarkPosition', 'creditsOffset', - 'dpSupplementalMessage', 'watched', 'delivery', 'sequiturEvidence', 'promoVideo', 'availability']], + 'dpSupplementalMessage', 'watched', 'delivery', 'sequiturEvidence', 'promoVideo', 'availability', 'itemSummary']], [['genres', 'tags', 'creators', 'directors', 'cast'], {'from': 0, 'to': 10}, ['id', 'name']] ] + ART_PARTIAL_PATHS From 61ae1675afcc0b9ff83ce707d0c66acadcef57ec Mon Sep 17 00:00:00 2001 From: CastagnaIT Date: Tue, 16 Apr 2024 09:43:12 +0200 Subject: [PATCH 4/4] [api_requests] Disabled login with credentials --- resources/lib/utils/api_requests.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/resources/lib/utils/api_requests.py b/resources/lib/utils/api_requests.py index 3d6e41f83..c6cd1ce5a 100644 --- a/resources/lib/utils/api_requests.py +++ b/resources/lib/utils/api_requests.py @@ -28,7 +28,7 @@ def login(ask_credentials=True): try: is_success = False credentials = None - is_login_with_credentials = True + is_login_with_credentials = False # The database 'isAdsPlan' value is stored after the login, so the first time we have None value # this avoids to show the notice message multiple times if more login attempts will be done over the time show_ads_notice = G.LOCAL_DB.get_value('is_ads_plan', None, table=TABLE_SESSION) is None @@ -36,8 +36,17 @@ def login(ask_credentials=True): is_login_with_credentials = ui.show_yesno_dialog('Login', common.get_local_string(30340), yeslabel=common.get_local_string(30341), nolabel=common.get_local_string(30342)) - if is_login_with_credentials: - credentials = {'credentials': ui.ask_credentials()} + # if is_login_with_credentials: + # credentials = {'credentials': ui.ask_credentials()} + if is_login_with_credentials: + # The login page is changed now part of HTML seem protected by reCaptcha + # in the HTML page the reactContext data is added after the reCaptcha checks so at the moment + # it is not accessible by requesting the login page through python script, + # this prevents us to get the authURL code needed to perform the login request + ui.show_ok_dialog('Login', + 'Due to new website protections at moment the login with credentials is not available.') + is_login_with_credentials = False + if is_login_with_credentials: if common.make_call('login', credentials): is_success = True