aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/nbc.py
diff options
context:
space:
mode:
authorTimendum <timedum@gmail.com>2018-09-08 09:44:06 +0200
committerSergey M <dstftw@gmail.com>2018-09-08 14:44:06 +0700
commitd0c5fabc1215fddd354fd91cd65082e45df1165e (patch)
treec5c99a4202f22b0ef9a2e8be61fa71eee1aeff09 /youtube_dl/extractor/nbc.py
parentad98d2eb748b593dc044296493904607c3058e8b (diff)
[nbc] Fix extraction of percent encoded URLs (closes #17374)
Diffstat (limited to 'youtube_dl/extractor/nbc.py')
-rw-r--r--youtube_dl/extractor/nbc.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/nbc.py b/youtube_dl/extractor/nbc.py
index c843f8649..765c46fd2 100644
--- a/youtube_dl/extractor/nbc.py
+++ b/youtube_dl/extractor/nbc.py
@@ -7,6 +7,7 @@ import re
from .common import InfoExtractor
from .theplatform import ThePlatformIE
from .adobepass import AdobePassIE
+from ..compat import compat_urllib_parse_unquote
from ..utils import (
find_xpath_attr,
smuggle_url,
@@ -75,11 +76,16 @@ class NBCIE(AdobePassIE):
'url': 'https://www.nbc.com/classic-tv/charles-in-charge/video/charles-in-charge-pilot/n3310',
'only_matching': True,
},
+ {
+ # Percent escaped url
+ 'url': 'https://www.nbc.com/up-all-night/video/day-after-valentine%27s-day/n2189',
+ 'only_matching': True,
+ }
]
def _real_extract(self, url):
permalink, video_id = re.match(self._VALID_URL, url).groups()
- permalink = 'http' + permalink
+ permalink = 'http' + compat_urllib_parse_unquote(permalink)
response = self._download_json(
'https://api.nbc.com/v3/videos', video_id, query={
'filter[permalink]': permalink,