X-Git-Url: http://git.code-monkey.de/?p=plugin.video.netflix.git;a=blobdiff_plain;f=resources%2Flib%2FNetflixSession.py;h=a4c48744ef7a933cd6e0cc18ef2dc8b9a0dc4929;hp=2798de05fd20eb5528da29342b194b0a1ffddde9;hb=385854355a756f1689ef897443876e4f75ace542;hpb=c83841672d0834fd26d54d87e5a4430c47a3e15f diff --git a/resources/lib/NetflixSession.py b/resources/lib/NetflixSession.py index 2798de0..a4c4874 100644 --- a/resources/lib/NetflixSession.py +++ b/resources/lib/NetflixSession.py @@ -6,11 +6,11 @@ import os import json from requests import session, cookies -from urllib import quote +from urllib import quote, unquote from time import time from base64 import urlsafe_b64encode from bs4 import BeautifulSoup, SoupStrainer -from utils import noop +from utils import noop, get_user_agent_for_current_platform try: import cPickle as pickle except: @@ -32,7 +32,8 @@ class NetflixSession: 'adult_pin': '/pin/service', 'metadata': '/metadata', 'set_video_rating': '/setVideoRating', - 'update_my_list': '/playlistop' + 'update_my_list': '/playlistop', + 'kids': '/Kids' } """:obj:`dict` of :obj:`str` List of all static endpoints for HTML/JSON POST/GET requests""" @@ -102,7 +103,7 @@ class NetflixSession: # start session, fake chrome on the current platform (so that we get a proper widevine esn) & enable gzip self.session = session() self.session.headers.update({ - 'User-Agent': self._get_user_agent_for_current_platform(), + 'User-Agent': get_user_agent_for_current_platform(), 'Accept-Encoding': 'gzip' }) @@ -148,13 +149,13 @@ class NetflixSession: :obj:`list` of :obj:`dict` List of all the serialized data pulled out of the pagws