projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[reddit] Update test
[youtube-dl]
/
youtube_dl
/
extractor
/
mangomolo.py
diff --git
a/youtube_dl/extractor/mangomolo.py
b/youtube_dl/extractor/mangomolo.py
index 2db503f2b13dc8499a6f665ef97d3e09cfcdf35b..482175a3412db859e32cb79893df1c830afa17e7 100644
(file)
--- a/
youtube_dl/extractor/mangomolo.py
+++ b/
youtube_dl/extractor/mangomolo.py
@@
-1,13
+1,12
@@
# coding: utf-8
from __future__ import unicode_literals
# coding: utf-8
from __future__ import unicode_literals
-import base64
-
from .common import InfoExtractor
from .common import InfoExtractor
-from ..compat import
compat_urllib_parse_unquote
-from ..utils import (
-
int_or_non
e,
+from ..compat import
(
+ compat_b64decode,
+
compat_urllib_parse_unquot
e,
)
)
+from ..utils import int_or_none
class MangomoloBaseIE(InfoExtractor):
class MangomoloBaseIE(InfoExtractor):
@@
-22,7
+21,7
@@
class MangomoloBaseIE(InfoExtractor):
format_url = self._html_search_regex(
[
format_url = self._html_search_regex(
[
- r'file\s*:\s*"(https?://[^"]+?/playlist.m3u8)',
+ r'file\s*:\s*"(https?://[^"]+?/playlist
\
.m3u8)',
r'<a[^>]+href="(rtsp://[^"]+)"'
], webpage, 'format url')
formats = self._extract_wowza_formats(
r'<a[^>]+href="(rtsp://[^"]+)"'
], webpage, 'format url')
formats = self._extract_wowza_formats(
@@
-41,14
+40,14
@@
class MangomoloBaseIE(InfoExtractor):
class MangomoloVideoIE(MangomoloBaseIE):
IE_NAME = 'mangomolo:video'
class MangomoloVideoIE(MangomoloBaseIE):
IE_NAME = 'mangomolo:video'
- _VALID_URL = r'https?://admin\.mangomolo.com/analytics/index\.php/customers/embed/video\?.*?\bid=(?P<id>\d+)'
+ _VALID_URL = r'https?://admin\.mangomolo
\
.com/analytics/index\.php/customers/embed/video\?.*?\bid=(?P<id>\d+)'
_IS_LIVE = False
class MangomoloLiveIE(MangomoloBaseIE):
IE_NAME = 'mangomolo:live'
_IS_LIVE = False
class MangomoloLiveIE(MangomoloBaseIE):
IE_NAME = 'mangomolo:live'
- _VALID_URL = r'https?://admin\.mangomolo.com/analytics/index\.php/customers/embed/index\?.*?\bchannelid=(?P<id>(?:[A-Za-z0-9+/=]|%2B|%2F|%3D)+)'
+ _VALID_URL = r'https?://admin\.mangomolo
\
.com/analytics/index\.php/customers/embed/index\?.*?\bchannelid=(?P<id>(?:[A-Za-z0-9+/=]|%2B|%2F|%3D)+)'
_IS_LIVE = True
def _get_real_id(self, page_id):
_IS_LIVE = True
def _get_real_id(self, page_id):
- return
base64.b64decode(compat_urllib_parse_unquote(page_id).encode(
)).decode()
+ return
compat_b64decode(compat_urllib_parse_unquote(page_id
)).decode()