diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-05-26 00:15:38 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-05-26 00:15:38 +0700 |
commit | f2fc63a5a873391b9ac15642507a2eae71e42906 (patch) | |
tree | 267b4de3fe0c46e6ed7dc07c4c32161b8203ea5b | |
parent | c561b75c82247188e010b6b53c118bb26b4daaf0 (diff) |
[peertube] Add support for embed and API URLs
-rw-r--r-- | youtube_dl/extractor/peertube.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/extractor/peertube.py b/youtube_dl/extractor/peertube.py index b086f6f5a..61c41add0 100644 --- a/youtube_dl/extractor/peertube.py +++ b/youtube_dl/extractor/peertube.py @@ -116,7 +116,8 @@ class PeerTubeIE(InfoExtractor): videos\.tcit\.fr| peertube\.cpy\.re ) - /videos/watch/(?P<id>[^/?#&]+) + /(?:videos/(?:watch|embed)|api/v\d/videos)/ + (?P<id>[^/?#&]+) ''' _TESTS = [{ 'url': 'https://peertube.moe/videos/watch/2790feb0-8120-4e63-9af3-c943c69f5e6c', @@ -147,6 +148,12 @@ class PeerTubeIE(InfoExtractor): # nsfw 'url': 'https://tube.22decembre.eu/videos/watch/9bb88cd3-9959-46d9-9ab9-33d2bb704c39', 'only_matching': True, + }, { + 'url': 'https://tube.22decembre.eu/videos/embed/fed67262-6edb-4d1c-833b-daa9085c71d7', + 'only_matching': True, + }, { + 'url': 'https://tube.openalgeria.org/api/v1/videos/c1875674-97d0-4c94-a058-3f7e64c962e8', + 'only_matching': True, }] def _real_extract(self, url): |