Repository: streamlink/streamlink

Issue:
Mitele
### Checklist

- [x] This is a bug report.
- [ ] This is a feature request.
- [ ] This is a plugin (improvement) request.
- [ ] I have read the contribution guidelines.


Channel Energy:
https://www.mitele.es/directo/energy
```
streamlink.exe https://www.mitele.es/directo/energy best --player ffplay -l debug
[console][debug] OS:         Windows 7
[console][debug] Python:     3.5.2
[console][debug] Streamlink: 0.13.0
[console][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.48.0)
[console][info] Found matching plugin mitele for URL https://www.mitele.es/directo/energy
error: Unable to validate JSON: Unable to validate key 'locations': Unable to validate key 'ogn': Type of None should be 'str' but is 'NoneType'
```

Channel Be Mad:
https://www.mitele.es/directo/bemad
```
streamlink.exe https://www.mitele.es/directo/bemad best --player ffplay -l debug
[console][debug] OS:         Windows 7
[console][debug] Python:     3.5.2
[console][debug] Streamlink: 0.13.0
[console][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.48.0)
[console][info] Found matching plugin mitele for URL https://www.mitele.es/directo/bemad
[plugin.mitele][debug] HLS URL: https://mdslivehls-i.akamaihd.net/hls/live/571646/bemad/master.m3u8?hdnea=st=1529962765~exp=1529962773~acl=/hls/live/571646/bemad/*~hmac=479d365ee94787ee2b8589af0481965e7d9db7b64f221e972e9ae700a4dbc511&ogn=o0t6vboys4gf5myd/zPCDTrD4mngkRY2xpxAy2RZpc8YKMY/OXWaKkIdDCyb1JsI6lgjrjbG62fAz0QlSA7PGYLbDOCkr17OPEswGGPi3Hk=
[console][info] Available streams: 360p (worst), 480p, 720p_alt, 720p (best)
[console][info] Opening stream: 720p (hls)
[stream.hls][debug] Reloading playlist
[console][error] Try 1/1: Could not open stream <HLSStream('https://mdslivehls-i.akamaihd.net/hls/live/571646/bemad/bitrate_3.m3u8')> (Could not open stream: Unable to open URL: https://mdslivehls-i.akamaihd.net/hls/live/571646/bemad/bitrate_3.m3u8 (404 Client Error: Not Found for url: https://mdslivehls-i.akamaihd.net/hls/live/571646/bemad/bitrate_3.m3u8))
error: Could not open stream <HLSStream('https://mdslivehls-i.akamaihd.net/hls/live/571646/bemad/bitrate_3.m3u8')>, tried 1 times, exiting
```

Channel Boing:
https://www.mitele.es/directo/boing
```
streamlink.exe https://www.mitele.es/directo/boing best --player ffplay -l debug
[console][debug] OS:         Windows 7
[console][debug] Python:     3.5.2
[console][debug] Streamlink: 0.13.0
[console][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.48.0)
[console][info] Found matching plugin mitele for URL https://www.mitele.es/directo/boing
[plugin.mitele][debug] HLS URL: https://mdslivehls-i.akamaihd.net/hls/live/571647/boing/master.m3u8?hdnea=st=1529963719~exp=1529963727~acl=/hls/live/571647/boing/*~hmac=a4496414861bffafc289305413248f581d26478a6a1680dc14b0c0d628ff185a&ogn=o0t6vboys4gf5myd/zPCDTrD4mngkRY2xpxAy2RZpc8YKMY/OXWaKkIdDCyb1JsIKjCZ1AX0ylNLwo7kPa/4h0j6jEXEzzq1zbN69Jz07zU=
[console][info] Available streams: 360p (worst), 480p, 720p_alt, 720p (best)
[console][info] Opening stream: 720p (hls)
[stream.hls][debug] Reloading playlist
[console][error] Try 1/1: Could not open stream <HLSStream('https://mdslivehls-i.akamaihd.net/hls/live/571647/boing/bitrate_3.m3u8')> (Could not open stream: Unable to open URL: https://mdslivehls-i.akamaihd.net/hls/live/571647/boing/bitrate_3.m3u8 (404 Client Error: Not Found for url: https://mdslivehls-i.akamaihd.net/hls/live/571647/boing/bitrate_3.m3u8))
error: Could not open stream <HLSStream('https://mdslivehls-i.akamaihd.net/hls/live/571647/boing/bitrate_3.m3u8')>, tried 1 times, exiting
```


Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/mitele.py b/src/streamlink/plugins/mitele.py
--- a/src/streamlink/plugins/mitele.py
+++ b/src/streamlink/plugins/mitele.py
@@ -31,7 +31,7 @@ class Mitele(Plugin):
         "telecinco": livehlsdai,
     }
 
-    pdata_url = "https://indalo.mediaset.es/mmc-player/api/mmc/v1/{channel}/live/flash.json"
+    pdata_url = "https://indalo.mediaset.es/mmc-player/api/mmc/v1/{channel}/live/html5.json"
     gate_url = "https://gatekeeper.mediaset.es"
 
     pdata_schema = validate.Schema(
@@ -39,7 +39,7 @@ class Mitele(Plugin):
             {
                 "locations": [{
                     "gcp": validate.text,
-                    "ogn": validate.text,
+                    "ogn": validate.any(None, validate.text),
                 }],
             },
             validate.get("locations"),
@@ -117,7 +117,7 @@ def _get_streams(self):
 
         if hls_url:
             self.logger.debug("HLS URL: {0}".format(hls_url))
-            for s in HLSStream.parse_variant_playlist(self.session, hls_url, headers=self.headers).items():
+            for s in HLSStream.parse_variant_playlist(self.session, hls_url, headers=self.headers, name_fmt="{pixels}_{bitrate}").items():
                 yield s
 
 


Test patch: