From 782195a9d417aab21cff4abe35ad9d705f4d8d83 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Wed, 11 Oct 2017 15:48:32 +0000 Subject: [once] add support for vmap urls --- youtube_dl/extractor/gamespot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index 00d3111..02804d2 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -105,7 +105,7 @@ class GameSpotIE(OnceIE): onceux_url = self._parse_json(unescapeHTML(onceux_json), page_id).get('metadataUri') if onceux_url: formats.extend(self._extract_once_formats(re.sub( - r'https?://[^/]+', 'http://once.unicornmedia.com', onceux_url).replace('ads/vmap/', ''))) + r'https?://[^/]+', 'http://once.unicornmedia.com', onceux_url))) if not formats: for quality in ['sd', 'hd']: -- cgit v1.1 From b0f4331002798522621aff55deaf18406d17e081 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Thu, 2 Nov 2017 13:30:01 +0100 Subject: [gamespot] extract formats referenced with new data fields(#14652) --- youtube_dl/extractor/gamespot.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index 02804d2..6d177cb 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -14,7 +14,7 @@ from ..utils import ( class GameSpotIE(OnceIE): - _VALID_URL = r'https?://(?:www\.)?gamespot\.com/.*-(?P\d+)/?' + _VALID_URL = r'https?://(?:www\.)?gamespot\.com/videos/(?:[^/]+/\d+-|embed/)(?P\d+)' _TESTS = [{ 'url': 'http://www.gamespot.com/videos/arma-3-community-guide-sitrep-i/2300-6410818/', 'md5': 'b2a30deaa8654fcccd43713a6b6a4825', @@ -35,6 +35,9 @@ class GameSpotIE(OnceIE): 'params': { 'skip_download': True, # m3u8 downloads }, + }, { + 'url': 'https://www.gamespot.com/videos/embed/6439218/', + 'only_matching': True, }] def _real_extract(self, url): @@ -52,7 +55,7 @@ class GameSpotIE(OnceIE): manifest_url = f4m_url formats.extend(self._extract_f4m_formats( f4m_url + '?hdcore=3.7.0', page_id, f4m_id='hds', fatal=False)) - m3u8_url = streams.get('m3u8_stream') + m3u8_url = dict_get(streams, ('m3u8_stream', 'adaptive_stream')) if m3u8_url: manifest_url = m3u8_url m3u8_formats = self._extract_m3u8_formats( @@ -60,7 +63,7 @@ class GameSpotIE(OnceIE): m3u8_id='hls', fatal=False) formats.extend(m3u8_formats) progressive_url = dict_get( - streams, ('progressive_hd', 'progressive_high', 'progressive_low')) + streams, ('progressive_hd', 'progressive_high', 'progressive_low', 'other_lr')) if progressive_url and manifest_url: qualities_basename = self._search_regex( r'/([^/]+)\.csmil/', -- cgit v1.1 From a5203935d6cb753bafaf67164553027b62c01781 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Sat, 11 Nov 2017 12:41:15 +0100 Subject: [gamespot] skip Brightcove Once http formats(#14652) --- youtube_dl/extractor/gamespot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index 6d177cb..be1ed8b 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -108,7 +108,8 @@ class GameSpotIE(OnceIE): onceux_url = self._parse_json(unescapeHTML(onceux_json), page_id).get('metadataUri') if onceux_url: formats.extend(self._extract_once_formats(re.sub( - r'https?://[^/]+', 'http://once.unicornmedia.com', onceux_url))) + r'https?://[^/]+', 'http://once.unicornmedia.com', onceux_url), + skip_http_formats=True)) if not formats: for quality in ['sd', 'hd']: -- cgit v1.1 From 79d1f8ed6803b6097f0f3cd57f72e0378bdc1f34 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Sat, 11 Nov 2017 13:02:39 +0100 Subject: [gamespot] add support for article URLS(closes #14652) --- youtube_dl/extractor/gamespot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index be1ed8b..e6d6d9b 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -14,7 +14,7 @@ from ..utils import ( class GameSpotIE(OnceIE): - _VALID_URL = r'https?://(?:www\.)?gamespot\.com/videos/(?:[^/]+/\d+-|embed/)(?P\d+)' + _VALID_URL = r'https?://(?:www\.)?gamespot\.com/(?:video|article)s/(?:[^/]+/\d+-|embed/)(?P\d+)' _TESTS = [{ 'url': 'http://www.gamespot.com/videos/arma-3-community-guide-sitrep-i/2300-6410818/', 'md5': 'b2a30deaa8654fcccd43713a6b6a4825', -- cgit v1.1 From d4e31b72b971172ffdee7fbe3070d20e4454259c Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Mon, 13 Nov 2017 10:24:35 +0100 Subject: [gamespot] lower the preference of http formats(#14652) --- youtube_dl/extractor/gamespot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index e6d6d9b..a9606a0 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -109,7 +109,7 @@ class GameSpotIE(OnceIE): if onceux_url: formats.extend(self._extract_once_formats(re.sub( r'https?://[^/]+', 'http://once.unicornmedia.com', onceux_url), - skip_http_formats=True)) + http_formats_preference=-1)) if not formats: for quality in ['sd', 'hd']: -- cgit v1.1 From 388beb86e0c8e3f76958aa8a258bd396b8b1e0fe Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Mon, 13 Nov 2017 10:30:12 +0100 Subject: [gamespot] add test for #14652 --- youtube_dl/extractor/gamespot.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'youtube_dl/extractor/gamespot.py') diff --git a/youtube_dl/extractor/gamespot.py b/youtube_dl/extractor/gamespot.py index a9606a0..ab647dd 100644 --- a/youtube_dl/extractor/gamespot.py +++ b/youtube_dl/extractor/gamespot.py @@ -38,6 +38,9 @@ class GameSpotIE(OnceIE): }, { 'url': 'https://www.gamespot.com/videos/embed/6439218/', 'only_matching': True, + }, { + 'url': 'https://www.gamespot.com/articles/the-last-of-us-2-receives-new-ps4-trailer/1100-6454469/', + 'only_matching': True, }] def _real_extract(self, url): -- cgit v1.1