Repository: streamlink/streamlink

Issue:
ine.py for source in data["playlist"][0]["sources"]: TypeError: 'NoneType' object is not subscriptable
Hi, INE plugin is failing since recently:

```
$ streamlink -o ./streamlink.mp4 https://streaming.ine.com/play/1cfbc029-dd6d-4646-80b9-7316e3ac121a/introduction 720p --http-cookie laravel_session=removed
[cli][info] Found matching plugin ine for URL https://streaming.ine.com/play/1cfbc029-dd6d-4646-80b9-7316e3ac121a/introduction
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/streamlink", line 11, in <module>
    load_entry_point('streamlink==0.6.0', 'console_scripts', 'streamlink')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 1027, in main
    handle_url()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 482, in handle_url
    streams = fetch_streams(plugin)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 394, in fetch_streams
    sorting_excludes=args.stream_sorting_excludes)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugin/plugin.py", line 328, in get_streams
    return self.streams(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugin/plugin.py", line 236, in streams
    ostreams = self._get_streams()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugins/ine.py", line 50, in _get_streams
    for source in data["playlist"][0]["sources"]:
TypeError: 'NoneType' object is not subscriptable
$ 
$ python --version
Python 3.5.3
$ streamlink --version
streamlink 0.6.0
$ streamlink --version-check
[cli][info] Your Streamlink version (0.6) is up to date!
$
```
Same error on mac OS and Windows.
This particular URL was 'downloadable' with no problem about a month ago or so.


Discussion:
Same URL with '--loglevel debug' just in case:

```
$ streamlink -o ./streamlink.mp4 https://streaming.ine.com/play/1cfbc029-dd6d-4646-80b9-7316e3ac121a/introduction 720p --loglevel debug --http-cookie laravel_session=removed
[cli][info] Found matching plugin ine for URL https://streaming.ine.com/play/1cfbc029-dd6d-4646-80b9-7316e3ac121a/introduction
[plugin.ine][debug] Found video ID: 1cfbc029-dd6d-4646-80b9-7316e3ac121a
[plugin.ine][debug] Loading player JS: https://content.jwplatform.com/players/aLBZ9PbQ-p4NBeNN0.js?exp=1499343063&amp;sig=9fba6b330907964e9898a2e4759e5c05
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/streamlink", line 11, in <module>
    load_entry_point('streamlink==0.6.0', 'console_scripts', 'streamlink')()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 1027, in main
    handle_url()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 482, in handle_url
    streams = fetch_streams(plugin)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink_cli/main.py", line 394, in fetch_streams
    sorting_excludes=args.stream_sorting_excludes)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugin/plugin.py", line 328, in get_streams
    return self.streams(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugin/plugin.py", line 236, in streams
    ostreams = self._get_streams()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/streamlink/plugins/ine.py", line 50, in _get_streams
    for source in data["playlist"][0]["sources"]:
TypeError: 'NoneType' object is not subscriptable
$
```
Thanks the detailed report with the debug log. Looks like jwplayer changed their embedded player js source a bit. I'm preparing a PR to fix it now :) 

Resolving patch:
diff --git a/src/streamlink/plugins/ine.py b/src/streamlink/plugins/ine.py
--- a/src/streamlink/plugins/ine.py
+++ b/src/streamlink/plugins/ine.py
@@ -15,7 +15,7 @@ class INE(Plugin):
             (.*?)""", re.VERBOSE)
     play_url = "https://streaming.ine.com/play/{vid}/watch"
     js_re = re.compile(r'''script type="text/javascript" src="(https://content.jwplatform.com/players/.*?)"''')
-    jwplayer_re = re.compile(r'''jwplayer\(".*?"\).setup\((\{.*\})\);''', re.DOTALL)
+    jwplayer_re = re.compile(r'''jwConfig\s*=\s*(\{.*\});''', re.DOTALL)
     setup_schema = validate.Schema(
         validate.transform(jwplayer_re.search),
         validate.any(


Test patch: