projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[once] Prevent ads from embedding into m3u8 playlists (Closes #8893)
[youtube-dl]
/
youtube_dl
/
extractor
/
shared.py
diff --git
a/youtube_dl/extractor/shared.py
b/youtube_dl/extractor/shared.py
index 4fa991dff600bce5c932921c17e70f3fdf26858e..96fe0b90d91b080218ca387d8a4403130171358d 100644
(file)
--- a/
youtube_dl/extractor/shared.py
+++ b/
youtube_dl/extractor/shared.py
@@
-3,19
+3,17
@@
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
import base64
from .common import InfoExtractor
-from ..compat import (
- compat_urllib_parse,
- compat_urllib_request,
-)
+from ..compat import compat_urllib_parse
from ..utils import (
ExtractorError,
int_or_none,
from ..utils import (
ExtractorError,
int_or_none,
+ sanitized_Request,
)
class SharedIE(InfoExtractor):
IE_DESC = 'shared.sx and vivo.sx'
)
class SharedIE(InfoExtractor):
IE_DESC = 'shared.sx and vivo.sx'
- _VALID_URL = r'http://(?:shared|vivo)\.sx/(?P<id>[\da-z]{10})'
+ _VALID_URL = r'http
s?
://(?:shared|vivo)\.sx/(?P<id>[\da-z]{10})'
_TESTS = [{
'url': 'http://shared.sx/0060718775',
_TESTS = [{
'url': 'http://shared.sx/0060718775',
@@
-24,6
+22,7
@@
class SharedIE(InfoExtractor):
'id': '0060718775',
'ext': 'mp4',
'title': 'Bmp4',
'id': '0060718775',
'ext': 'mp4',
'title': 'Bmp4',
+ 'filesize': 1720110,
},
}, {
'url': 'http://vivo.sx/d7ddda0e78',
},
}, {
'url': 'http://vivo.sx/d7ddda0e78',
@@
-45,7
+44,7
@@
class SharedIE(InfoExtractor):
'Video %s does not exist' % video_id, expected=True)
download_form = self._hidden_inputs(webpage)
'Video %s does not exist' % video_id, expected=True)
download_form = self._hidden_inputs(webpage)
- request =
compat_urllib_request.
Request(
+ request =
sanitized_
Request(
url, compat_urllib_parse.urlencode(download_form))
request.add_header('Content-Type', 'application/x-www-form-urlencoded')
url, compat_urllib_parse.urlencode(download_form))
request.add_header('Content-Type', 'application/x-www-form-urlencoded')