aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeauxlo <66712139+geauxlo@users.noreply.github.com>2020-06-10 06:39:35 +0000
committerGitHub <noreply@github.com>2020-06-10 06:39:35 +0000
commit66c498e5586e0b90b0579e6e0754cfc03775a3a8 (patch)
tree565e2367b040791f2c89163223e334e1ff549aa4
parent3951a7faae1c3916827d01b1e242bb12a9cdadec (diff)
downloadhypervideo-pre-66c498e5586e0b90b0579e6e0754cfc03775a3a8.tar.lz
hypervideo-pre-66c498e5586e0b90b0579e6e0754cfc03775a3a8.tar.xz
hypervideo-pre-66c498e5586e0b90b0579e6e0754cfc03775a3a8.zip
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
-rw-r--r--youtube_dl/extractor/screencast.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/youtube_dl/extractor/screencast.py b/youtube_dl/extractor/screencast.py
index d52d46cc3..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<id>[a-zA-Z0-9]+)'
+ _VALID_URL = r'https?://(?:www\.)?screencast\.com/(?:t|users/[^/]+/folders/[^/]+/media)/(?P<id>[a-zA-Z0-9\-]+)'
_API_URL = 'https://www.screencast.com/api/external/oembed?url=%s&format=json'
_TESTS = [{
@@ -60,12 +60,22 @@ 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):
video_id = self._match_id(url)
- # The info JSON given by the API has a thumbnail URL,
+ # The JSON given by the API has a thumbnail URL,
# but it's inferior to the webpage's thumbnail.
# It also has no video description, so we
# definitely still need to get the webpage.