# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class ErocastIE(InfoExtractor): IE_NAME = 'erocast' _VALID_URL = r'https?://(?:www\.)?erocast\.me/track/(?P[0-9]+)/(?P[0-9a-zA-Z_-]+)' _TEST = { 'url': 'https://erocast.me/track/6508/piano-sample-by-ytdl', 'md5': '6764726b2d19161e93c9cf3a9a69800a', 'info_dict': { 'id': '6508', 'ext': 'mp4', 'title': 'Piano sample by ytdl', 'uploader': 'ytdl', } } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) # The Song data is in a script tag with the following format: # (see https://github.com/ytdl-org/youtube-dl/issues/31203#issuecomment-1259867716) searchPattern = r'