mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
Sonuma and acidcow
This commit is contained in:
parent
62b725f460
commit
46d03da3dd
37
youtube_dl/extractor/acidcow.py
Normal file
37
youtube_dl/extractor/acidcow.py
Normal file
@ -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<id>\d+)-(?P<title>\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>(.+?)</title>', webpage, 'title')
|
||||||
|
download_url = self._html_search_regex(
|
||||||
|
r'<video src="https://cdn.acidcow.com/pics/([0-9]+/(?P<title>\s+))"/>',
|
||||||
|
|
||||||
|
webpage, "download_url"
|
||||||
|
)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'url': download_url,
|
||||||
|
'title': title
|
||||||
|
}
|
||||||
|
-
|
@ -1033,6 +1033,7 @@ from .southpark import (
|
|||||||
SouthParkNlIE
|
SouthParkNlIE
|
||||||
)
|
)
|
||||||
from .sonuma import sonumaIE
|
from .sonuma import sonumaIE
|
||||||
|
from .acidcow import acidcowIE
|
||||||
from .spankbang import (
|
from .spankbang import (
|
||||||
SpankBangIE,
|
SpankBangIE,
|
||||||
SpankBangPlaylistIE,
|
SpankBangPlaylistIE,
|
||||||
|
@ -5,15 +5,17 @@ from .common import InfoExtractor
|
|||||||
|
|
||||||
class sonumaIE(InfoExtractor):
|
class sonumaIE(InfoExtractor):
|
||||||
|
|
||||||
|
|
||||||
_VALID_URL=r'(?:https?://)?(?:www\.)?sonuma\.be/archive/'
|
_VALID_URL=r'(?:https?://)?(?:www\.)?sonuma\.be/archive/'
|
||||||
|
|
||||||
def _real_extract(self,url):
|
def _real_extract(self, url):
|
||||||
video_id=self._match_id(url)
|
video_id=self._match_id(url)
|
||||||
webpage = self._download_webpage("https://www.sonuma.be/archive/%s/"% video_id, video_id)
|
webpage = self._download_webpage("https://www.sonuma.be/archive/%s/"% video_id, video_id)
|
||||||
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
||||||
|
|
||||||
download_url=self._html_search_regex(
|
download_url=self._html_search_regex(
|
||||||
r'https://vod.infomaniak.com/redirect/sonumasa_2_vod/web2-39166/copy-32/d611823b-d693-29b6-e040-010a07647b9b.mp4?sKey=2faa94b1da19002ca8b8abe944a7ecc8',webpage,"title")
|
r'https://vod.infomaniak.com/redirect/sonumasa_2_vod/web2-39166/copy-32/d611823b-d693-29b6-e040'
|
||||||
|
r'-010a07647b9b.mp4?sKey=2faa94b1da19002ca8b8abe944a7ecc8', webpage, "title")
|
||||||
return{
|
return{
|
||||||
'id':video_id,
|
'id':video_id,
|
||||||
'title':title,
|
'title':title,
|
||||||
|
Loading…
Reference in New Issue
Block a user