From 53476dac5d8880e691caae3a1613c64762812103 Mon Sep 17 00:00:00 2001 From: Matt Crupi Date: Sat, 29 Jul 2017 16:20:21 -0700 Subject: [PATCH 1/4] Fix for #13740 --- youtube_dl/extractor/mlb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index 59cd4b838..7e12b128a 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -15,7 +15,7 @@ class MLBIE(InfoExtractor): (?:[\da-z_-]+\.)*mlb\.com/ (?: (?: - (?:.*?/)?video/(?:topic/[\da-z_-]+/)?v| + (?:.*?/)?video/(?:topic/[\da-z_-]+/)?(?:v|(?:.*?\/)c-)| (?: shared/video/embed/(?:embed|m-internal-embed)\.html| (?:[^/]+/)+(?:play|index)\.jsp| From 2416870cd998d0418819799d4331d78f2652a05e Mon Sep 17 00:00:00 2001 From: Matt Crupi Date: Sat, 29 Jul 2017 17:16:34 -0700 Subject: [PATCH 2/4] Oops - unnecessary '\' --- youtube_dl/extractor/mlb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index 7e12b128a..bc5a46c3b 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -15,7 +15,7 @@ class MLBIE(InfoExtractor): (?:[\da-z_-]+\.)*mlb\.com/ (?: (?: - (?:.*?/)?video/(?:topic/[\da-z_-]+/)?(?:v|(?:.*?\/)c-)| + (?:.*?/)?video/(?:topic/[\da-z_-]+/)?(?:v|(?:.*?/)c-)| (?: shared/video/embed/(?:embed|m-internal-embed)\.html| (?:[^/]+/)+(?:play|index)\.jsp| From 3ba12dfd1fcfc6f5fc3a45611f6d544bb10edf93 Mon Sep 17 00:00:00 2001 From: Matt Crupi Date: Sun, 30 Jul 2017 09:15:57 -0700 Subject: [PATCH 3/4] Add a test --- youtube_dl/extractor/mlb.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index bc5a46c3b..59b42d732 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -94,6 +94,18 @@ class MLBIE(InfoExtractor): 'upload_date': '20150415', } }, + { + 'url': 'https://www.mlb.com/video/hargrove-homers-off-caldwell/c-1352023483?tid=67793694', + 'md5': 'b2af6c81fcd6c8edd9c74daea0676359', + 'info_dict': { + 'id': '1352023483', + 'ext': 'mp4', + 'title': 'Hargrove homers off Caldwell', + 'description': '7/31/82: Mike Hargrove shows off a lengthy batting routine, then homers off Mike Caldwell', + 'timestamp': 396934380, + 'upload_date': '19820731', + } + }, { 'url': 'http://m.mlb.com/shared/video/embed/embed.html?content_id=35692085&topic_id=6479266&width=400&height=224&property=mlb', 'only_matching': True, From 7cfcc1b6ef521cb2ad9d2844164f4403b6d6567e Mon Sep 17 00:00:00 2001 From: Matt Crupi Date: Sun, 30 Jul 2017 12:12:42 -0700 Subject: [PATCH 4/4] Address PR comments --- youtube_dl/extractor/mlb.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/youtube_dl/extractor/mlb.py b/youtube_dl/extractor/mlb.py index 59b42d732..4d45f960e 100644 --- a/youtube_dl/extractor/mlb.py +++ b/youtube_dl/extractor/mlb.py @@ -15,7 +15,7 @@ class MLBIE(InfoExtractor): (?:[\da-z_-]+\.)*mlb\.com/ (?: (?: - (?:.*?/)?video/(?:topic/[\da-z_-]+/)?(?:v|(?:.*?/)c-)| + (?:.*?/)?video/(?:topic/[\da-z_-]+/)?(?:v|.*?/c-)| (?: shared/video/embed/(?:embed|m-internal-embed)\.html| (?:[^/]+/)+(?:play|index)\.jsp| @@ -96,15 +96,7 @@ class MLBIE(InfoExtractor): }, { 'url': 'https://www.mlb.com/video/hargrove-homers-off-caldwell/c-1352023483?tid=67793694', - 'md5': 'b2af6c81fcd6c8edd9c74daea0676359', - 'info_dict': { - 'id': '1352023483', - 'ext': 'mp4', - 'title': 'Hargrove homers off Caldwell', - 'description': '7/31/82: Mike Hargrove shows off a lengthy batting routine, then homers off Mike Caldwell', - 'timestamp': 396934380, - 'upload_date': '19820731', - } + 'only_matching': True, }, { 'url': 'http://m.mlb.com/shared/video/embed/embed.html?content_id=35692085&topic_id=6479266&width=400&height=224&property=mlb',