mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-07 13:47:54 +01:00
[narando] remove separate player extractor (was causing issues), add display_id attribute
This commit is contained in:
parent
92ae267c88
commit
200ad7687a
@ -672,6 +672,7 @@ from .myvi import (
|
||||
MyviEmbedIE,
|
||||
)
|
||||
from .myvidster import MyVidsterIE
|
||||
from .narando import NarandoIE
|
||||
from .nationalgeographic import (
|
||||
NationalGeographicVideoIE,
|
||||
NationalGeographicIE,
|
||||
@ -1482,4 +1483,3 @@ from .zingmp3 import ZingMp3IE
|
||||
from .zype import ZypeIE
|
||||
|
||||
|
||||
from .narando import NarandoIE, NarandoPlayerIE
|
||||
|
@ -11,7 +11,8 @@ class NarandoIE(InfoExtractor):
|
||||
'url': 'https://narando.com/articles/an-ihrem-selbstlob-erkennt-man-sie',
|
||||
'md5': 'd20f671f0395bab8f8285d1f6e8f965e',
|
||||
'info_dict': {
|
||||
'id': 'an-ihrem-selbstlob-erkennt-man-sie',
|
||||
'id': 'b2t4t789kxgy9g7ms4rwjvvw',
|
||||
'display_id': 'an-ihrem-selbstlob-erkennt-man-sie',
|
||||
'ext': 'mp3',
|
||||
'title': 'An ihrem Selbstlob erkennt man sie',
|
||||
'url': 'https://static.narando.com/sounds/10492/original.mp3',
|
||||
@ -27,17 +28,19 @@ class NarandoIE(InfoExtractor):
|
||||
title = self._html_search_regex(r'<h1 class="visible-xs h3">(.+?)</h1>', webpage, 'title')
|
||||
|
||||
player_id = self._html_search_regex(r'[\n\r].*https:\/\/narando.com\/r\/\s*([^"]*)', webpage, 'player_id')
|
||||
mobj = NarandoPlayerIE()
|
||||
download_url = mobj._real_extract("https://narando.com/widget?r=" + player_id)['url']
|
||||
player_page = self._download_webpage('https://narando.com/widget?r=' + player_id, player_id)
|
||||
download_url = self._html_search_regex(r'.<div class="stream_url hide">\s*([^?]*)', player_page, 'url')
|
||||
# download_url = NarandoPlayerIE()._real_extract('https://narando.com/widget?r=' + player_id)['url']
|
||||
description = self._html_search_regex(r'<meta content="(.+?)" property="og:description" />', webpage, 'description')
|
||||
return {
|
||||
'id': video_id,
|
||||
'display_id': video_id,
|
||||
'id': player_id,
|
||||
'title': title,
|
||||
'url': download_url,
|
||||
'description': description,
|
||||
}
|
||||
|
||||
|
||||
"""to be implemented later
|
||||
class NarandoPlayerIE(InfoExtractor):
|
||||
IE_NAME = "narando:player"
|
||||
_VALID_URL = r'https://narando.com/widget\?r=(?P<id>\w+)'
|
||||
@ -54,9 +57,7 @@ class NarandoPlayerIE(InfoExtractor):
|
||||
|
||||
def _real_extract(self, url):
|
||||
video_id = self._match_id(url)
|
||||
print(video_id)
|
||||
webpage = self._download_webpage('https://narando.com/widget?r=' + video_id, video_id)
|
||||
print(webpage)
|
||||
title = self._html_search_regex(r'<title>narando \| (.+?)</title>', webpage, 'title')
|
||||
|
||||
download_url = self._html_search_regex(r'.<div class="stream_url hide">\s*([^?]*)', webpage, 'download_url')
|
||||
@ -65,3 +66,4 @@ class NarandoPlayerIE(InfoExtractor):
|
||||
'title': title,
|
||||
'url': download_url,
|
||||
}
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user