From 46d03da3dd467502dd4034f9dd0bcc51ffe6b6b3 Mon Sep 17 00:00:00 2001 From: Dante Date: Sat, 28 Mar 2020 18:47:16 -0700 Subject: [PATCH] Sonuma and acidcow --- youtube_dl/extractor/acidcow.py | 37 ++++++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/sonuma.py | 6 +++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 youtube_dl/extractor/acidcow.py diff --git a/youtube_dl/extractor/acidcow.py b/youtube_dl/extractor/acidcow.py new file mode 100644 index 000000000..b023d747f --- /dev/null +++ b/youtube_dl/extractor/acidcow.py @@ -0,0 +1,37 @@ +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class acidcowIE(InfoExtractor): + """ + InfoExtractor for acid.cow + This class should be used to handle videos. Another class (TODO) will be + used to implement playlists or other content. + """ + # _VALID_URL = r'https?://app.matter.online/tracks/((?P\d+)-(?P\S+))/?' + _VALID_URL = r'https?://acidcow.com/video/([0-9]+-(?P<title>\s+))/?' + _TESTS = { + # TODO: Implement + + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage( + r'https://cdn.acidcow.com/pics/%s/video/(\S+)' % video_id, video_id + ) + + title = self._html_search_regex(r'<title>(.+?)', webpage, 'title') + download_url = self._html_search_regex( + r'