1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-05-19 19:49:33 +00:00
This commit is contained in:
Kyle Anthony Williams 2024-02-10 23:58:24 -05:00 committed by GitHub
commit eb354bad53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 38 additions and 0 deletions

View file

@ -1532,6 +1532,7 @@ from .vlive import (
VLivePostIE,
VLiveChannelIE,
)
from .vocaroo import VocarooIE
from .vodlocker import VodlockerIE
from .vodpl import VODPlIE
from .vodplatform import VODPlatformIE

View file

@ -0,0 +1,37 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class VocarooIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?(?:vocaroo\.com|voca\.ro)/(?:embed/)?(?P<id>[a-zA-Z0-9]{12})'
_TESTS = [
{
'url': 'https://vocaroo.com/1e976QE4oDoy',
'md5': '9ccf2014af38890e9e10450c901c17a6',
'info_dict': {
'id': '1e976QE4oDoy',
'ext': 'mp3',
'title': 'Vocaroo - 1e976QE4oDoy',
}
},
{
'url': 'https://vocaroo.com/embed/1e976QE4oDoy?autoplay=0',
'only_matching': True
},
{
'url': 'https://voca.ro/1ctMANMty97s',
'only_matching': True
},
]
def _real_extract(self, url):
audio_id = self._match_id(url)
return {
'id': audio_id,
'title': "Vocaroo - {}".format(audio_id),
'url': 'https://media1.vocaroo.com/mp3/{}'.format(audio_id),
'ext': 'mp3'
}