<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.netflix" name="Netflix" version="0.11.16" provider-name="libdev + jojo + asciidisco">
+<addon id="plugin.video.netflix" name="Netflix" version="0.11.17" provider-name="libdev + jojo + asciidisco">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.2"/>
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.16
+# Addon version: 0.11.17
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
from urllib import urlencode
from xbmcaddon import Addon
from uuid import uuid4
+from utils import get_user_agent_for_current_platform
from UniversalAnalytics import Tracker
try:
import cPickle as pickle
# inputstream addon properties
msl_service_url = 'http://localhost:' + str(addon.getSetting('msl_service_port'))
play_item = xbmcgui.ListItem(path=msl_service_url + '/manifest?id=' + video_id)
+ play_item.setContentLookup(False)
+ play_item.setMimeType('application/dash+xml')
+ play_item.setProperty(inputstream_addon + '.stream_headers', 'user-agent=' + get_user_agent_for_current_platform())
play_item.setProperty(inputstream_addon + '.license_type', 'com.widevine.alpha')
play_item.setProperty(inputstream_addon + '.manifest_type', 'mpd')
play_item.setProperty(inputstream_addon + '.license_key', msl_service_url + '/license?id=' + video_id + '||b{SSM}!b{SID}|')
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:
# 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'
})
"""
return urlsafe_b64encode(account['email'])
- def _get_user_agent_for_current_platform (self):
- """Determines the user agent string for the current platform (to retrieve a valid ESN)
-
- Returns
- -------
- :obj:`str`
- User Agent for platform
- """
- import platform
- self.log(msg='Building User Agent for platform: ' + str(platform.system()) + ' - ' + str(platform.machine()))
- if platform.system() == 'Darwin':
- return 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
- if platform.system() == 'Windows':
- return 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
- if platform.machine().startswith('arm'):
- return 'Mozilla/5.0 (X11; CrOS armv7l 7647.78.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36'
- return 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
-
def _session_post (self, component, type='document', data={}, headers={}, params={}):
"""Executes a get request using requests for the current session & measures the duration of that request
# Module: utils
# Created on: 13.01.2017
+import platform
+
# Takes everything, does nothing, classic no operation function
def noop (**kwargs):
return True
return result
wrapped.__doc__ = f.__doc__
return wrapped
+
+def _get_user_agent_for_current_platform():
+ """Determines the user agent string for the current platform (to retrieve a valid ESN)
+
+ Returns
+ -------
+ :obj:`str`
+ User Agent for platform
+ """
+ system = platform.system()
+ if system == 'Darwin':
+ return 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
+ if system == 'Windows':
+ return 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
+ if platform.machine().startswith('arm'):
+ return 'Mozilla/5.0 (X11; CrOS armv7l 7647.78.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'
+ return 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36'