From da78a4f3eeab37023aad09c36f68a7328363d120 Mon Sep 17 00:00:00 2001 From: geauxlo <66712139+geauxlo@users.noreply.github.com> Date: Wed, 10 Jun 2020 07:01:52 +0000 Subject: [PATCH] Recognize more valid URLs URLs like `https://www.screencast.com/users/cindyhailes/folders/Jing/media/c9be177c-5808-4c4f-af56-eadceb3a7c82` weren't being accepted before --- youtube_dl/extractor/screencast.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/screencast.py b/youtube_dl/extractor/screencast.py index 859c9dc0d..d23a53706 100644 --- a/youtube_dl/extractor/screencast.py +++ b/youtube_dl/extractor/screencast.py @@ -14,7 +14,7 @@ from ..utils import ( class ScreencastIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?screencast\.com/t/(?P[a-zA-Z0-9]+)' + _VALID_URL = r'https?://(?:www\.)?screencast\.com/(?:t|users/[^/]+/folders/[^/]+/media)/(?P[a-zA-Z0-9\-]+)' _API_URL = 'https://www.screencast.com/api/external/oembed?url=%s&format=json' _TESTS = [{ @@ -60,6 +60,16 @@ class ScreencastIE(InfoExtractor): }, { 'url': 'http://screencast.com/t/aAB3iowa', 'only_matching': True, + }, { + 'url': 'https://www.screencast.com/users/cindyhailes/folders/Jing/media/c9be177c-5808-4c4f-af56-eadceb3a7c82', + 'md5': '589d37a28d2add53c8bf16b9126d9dc2', + 'info_dict': { + 'id': 'c9be177c-5808-4c4f-af56-eadceb3a7c82', + 'ext': 'swf', + 'title': '2020-05-31_1737', + 'description': 'Shared from Screencast.com', + 'thumbnail': r're:^https?://.*\.(?:gif|jpg)$', + } }] def _real_extract(self, url):