commit
07e4fea6e6
@ -210,8 +210,8 @@ class TestUtil(unittest.TestCase):
|
|||||||
self.assertEqual(unescapeHTML('%20;'), '%20;')
|
self.assertEqual(unescapeHTML('%20;'), '%20;')
|
||||||
self.assertEqual(unescapeHTML('/'), '/')
|
self.assertEqual(unescapeHTML('/'), '/')
|
||||||
self.assertEqual(unescapeHTML('/'), '/')
|
self.assertEqual(unescapeHTML('/'), '/')
|
||||||
self.assertEqual(
|
self.assertEqual(unescapeHTML('é'), 'é')
|
||||||
unescapeHTML('é'), 'é')
|
self.assertEqual(unescapeHTML('�'), '�')
|
||||||
|
|
||||||
def test_daterange(self):
|
def test_daterange(self):
|
||||||
_20century = DateRange("19000101", "20000101")
|
_20century = DateRange("19000101", "20000101")
|
||||||
|
@ -40,7 +40,7 @@ class NetEaseMusicBaseIE(InfoExtractor):
|
|||||||
if not details:
|
if not details:
|
||||||
continue
|
continue
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': 'http://m1.music.126.net/%s/%s.%s' %
|
'url': 'http://m5.music.126.net/%s/%s.%s' %
|
||||||
(cls._encrypt(details['dfsId']), details['dfsId'],
|
(cls._encrypt(details['dfsId']), details['dfsId'],
|
||||||
details['extension']),
|
details['extension']),
|
||||||
'ext': details.get('extension'),
|
'ext': details.get('extension'),
|
||||||
|
@ -6,7 +6,7 @@ import re
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..compat import compat_urllib_request, compat_urlparse
|
from ..compat import compat_urllib_request
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
float_or_none,
|
float_or_none,
|
||||||
@ -107,15 +107,9 @@ class RTVEALaCartaIE(InfoExtractor):
|
|||||||
png = self._download_webpage(png_request, video_id, 'Downloading url information')
|
png = self._download_webpage(png_request, video_id, 'Downloading url information')
|
||||||
video_url = _decrypt_url(png)
|
video_url = _decrypt_url(png)
|
||||||
if not video_url.endswith('.f4m'):
|
if not video_url.endswith('.f4m'):
|
||||||
auth_url = video_url.replace(
|
video_url = video_url.replace(
|
||||||
'resources/', 'auth/resources/'
|
'resources/', 'auth/resources/'
|
||||||
).replace('.net.rtve', '.multimedia.cdn.rtve')
|
).replace('.net.rtve', '.multimedia.cdn.rtve')
|
||||||
video_path = self._download_webpage(
|
|
||||||
auth_url, video_id, 'Getting video url')
|
|
||||||
# Use mvod1.akcdn instead of flash.akamaihd.multimedia.cdn to get
|
|
||||||
# the right Content-Length header and the mp4 format
|
|
||||||
video_url = compat_urlparse.urljoin(
|
|
||||||
'http://mvod1.akcdn.rtve.es/', video_path)
|
|
||||||
|
|
||||||
subtitles = None
|
subtitles = None
|
||||||
if info.get('sbtFile') is not None:
|
if info.get('sbtFile') is not None:
|
||||||
|
@ -396,10 +396,14 @@ def _htmlentity_transform(entity):
|
|||||||
numstr = '0%s' % numstr
|
numstr = '0%s' % numstr
|
||||||
else:
|
else:
|
||||||
base = 10
|
base = 10
|
||||||
|
# See https://github.com/rg3/youtube-dl/issues/7518
|
||||||
|
try:
|
||||||
return compat_chr(int(numstr, base))
|
return compat_chr(int(numstr, base))
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
# Unknown entity in name, return its literal representation
|
# Unknown entity in name, return its literal representation
|
||||||
return ('&%s;' % entity)
|
return '&%s;' % entity
|
||||||
|
|
||||||
|
|
||||||
def unescapeHTML(s):
|
def unescapeHTML(s):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user