Repository: streamlink/streamlink

Issue:
Unable to play Dailymotion live stream
### Checklist

- [x] This is a bug report.
- [ ] This is a feature request.
- [ ] This is a plugin (improvement) request.
- [ ] I have read the contribution guidelines.

### Description

Streamlink cannot read the live stream http://www.dailymotion.com/video/x3b68jn

### Reproduction steps / Explicit stream URLs to test

```
$ streamlink -l debug http://www.dailymotion.com/video/x3b68jn
[cli][info] Found matching plugin dailymotion for URL http://www.dailymotion.com/video/x3b68jn
[plugin.dailymotion][debug] Found media ID: x3b68jn
error: Unable to parse manifest XML: syntax error: line 1, column 0 ('#EXTM3U\n#EXT-X-STREAM-INF:BANDWID ...)
```

### Environment details

Operating system and version: Fedora 25
Streamlink version: https://github.com/streamlink/streamlink/commit/0c31ca9115bb62550fb3af7b626ef5496b6cf81b (latest snapshot today)
Python version: 3.5.3

### Comments, logs, screenshots, etc.
This is the only live stream on DM I've found with this issue. All the others I tested are OK.


Discussion:
Same is here but I try other video:
http://www.dailymotion.com/video/x2qg8t0
and working OK
**streamlink-0.6.0.exe**

streamlink.exe "http://www.dailymotion.com/video/x3b68jn"
[cli][info] Found matching plugin dailymotion for URL http://www.dailymotion.com/video/x3b68jn
error: Unable to parse manifest XML: syntax error: line 1, column 0 ('#EXTM3U\n#EXT-X-STREAM-INF:BANDWID ...)


**youtube-dl 2017.05.29**

youtube-dl.exe -v -F --no-check-certificate http://www.dailymotion.com/video/x3b68jn
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-F', '--no-check-certificate', 'http://www.dailymotion.com/video/x3b68jn']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2017.05.29
[debug] Python version 3.4.4 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg n3.2.1, ffprobe 3.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[dailymotion] x3b68jn: Downloading webpage
[dailymotion] x3b68jn: Downloading m3u8 information
[info] Available formats for x3b68jn:
format code  extension  resolution note
hls-514-0    mp4        327x184     514k , avc1.66.30@ 420k, mp4a.40.5@ 64k
hls-514-1    mp4        327x184     514k , avc1.66.30@ 420k, mp4a.40.5@ 64k
hls-915-0    mp4        512x288     915k , avc1.66.30@ 735k, mp4a.40.2@128k
hls-915-1    mp4        512x288     915k , avc1.66.30@ 735k, mp4a.40.2@128k
hls-1472-0   mp4        853x480    1472k , avc1.66.30@1260k, mp4a.40.2@128k
hls-1472-1   mp4        853x480    1472k , avc1.66.30@1260k, mp4a.40.2@128k
hls-2362     mp4        1280x720   2362k , avc1.66.31@2100k, mp4a.40.2@128k
hls-2919     mp4        1280x720   2919k , avc1.66.32@2625k, mp4a.40.2@128k
hls-6814     mp4        1920x1080  6814k , avc1.66.40@6300k, mp4a.40.2@128k
hls-8484     mp4        1920x1080  8484k , avc1.66.42@7875k, mp4a.40.2@128k (best)

Resolving patch:
diff --git a/src/streamlink/plugins/dailymotion.py b/src/streamlink/plugins/dailymotion.py
--- a/src/streamlink/plugins/dailymotion.py
+++ b/src/streamlink/plugins/dailymotion.py
@@ -128,7 +128,12 @@ def _get_live_streams(self, params, swf_url):
                 continue
 
             if quality == "hds":
-                streams = HDSStream.parse_manifest(self.session, res.url)
+                self.logger.debug('PLAYLIST URL: {0}'.format(res.url))
+                try:
+                    streams = HDSStream.parse_manifest(self.session, res.url)
+                except:
+                    streams = HLSStream.parse_variant_playlist(self.session, res.url)
+
                 for name, stream in streams.items():
                     if key == "source":
                         name += "+"


Test patch: