diff --git a/youtube_dl/extractor/narando.py b/youtube_dl/extractor/narando.py index 2b05b705b..a6bb5f473 100644 --- a/youtube_dl/extractor/narando.py +++ b/youtube_dl/extractor/narando.py @@ -6,7 +6,7 @@ from .common import InfoExtractor class NarandoPlayerIE(InfoExtractor): IE_NAME = "narando:player" - _VALID_URL = r'https://narando.com/widget\?r=(?P\w+)' + _VALID_URL = r'https://narando\.com/widget\?r=(?P\w+)' _TEST = { 'url': 'https://narando.com/widget?r=b2t4t789kxgy9g7ms4rwjvvw', 'md5': 'd20f671f0395bab8f8285d1f6e8f965e', @@ -14,26 +14,25 @@ class NarandoPlayerIE(InfoExtractor): 'id': 'b2t4t789kxgy9g7ms4rwjvvw', 'ext': 'mp3', 'title': 'An ihrem Selbstlob erkennt man sie', - 'url': 'https://static.narando.com/sounds/10492/original.mp3', } } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage('https://narando.com/widget?r=' + video_id, video_id) - title = self._html_search_regex(r'narando \| (.+?)', webpage, 'title') + title = self._html_search_regex(r'(.+?)', webpage, 'title') download_url = self._html_search_regex(r'.
\s*([^?]*)', webpage, 'download_url') - return { 'id': video_id, 'title': title, 'url': download_url, + 'vcodec': 'none', } class NarandoIE(InfoExtractor): IE_NAME = "narando" - _VALID_URL = r'https?://(?:www\.)?narando\.com/articles/(?P([a-zA-Z]|-)+)' + _VALID_URL = r'https?://(?:www\.)?narando\.com/articles/(?P.+)' _TEST = { 'url': 'https://narando.com/articles/an-ihrem-selbstlob-erkennt-man-sie', 'md5': 'd20f671f0395bab8f8285d1f6e8f965e', @@ -41,15 +40,14 @@ class NarandoIE(InfoExtractor): 'id': 'b2t4t789kxgy9g7ms4rwjvvw', 'ext': 'mp3', 'title': 'An ihrem Selbstlob erkennt man sie', - 'url': 'https://static.narando.com/sounds/10492/original.mp3', } } def _real_extract(self, url): video_id = self._match_id(url) - webpage = self._download_webpage('https://narando.com/articles/' + video_id, video_id) + webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'

(.+?)

', webpage, 'title') - player_id = self._html_search_regex(r'[\n\r].*https:\/\/narando.com\/r\/\s*([^"]*)', webpage, 'player_id') + player_id = self._html_search_regex(r'\s*https://narando.com/r/([^"]*)', webpage, 'player_id') player_url = 'https://narando.com/widget?r=' + player_id return {