mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-07 13:47:54 +01:00
[narando] fix flake8 issues
This commit is contained in:
parent
a729d43d9e
commit
fed1f5ee0f
@ -3,13 +3,13 @@ from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
|
||||
|
||||
class NarandoIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://(?:www\.)?narando\.com/articles/(?P<id>([a-zA-Z]|-)+)'
|
||||
_TEST = {
|
||||
'url': 'https://narando.com/articles/an-ihrem-selbstlob-erkennt-man-sie',
|
||||
'md5': 'd20f671f0395bab8f8285d1f6e8f965e',
|
||||
'info_dict': {
|
||||
# 'id': 'b2t4t789kxgy9g7ms4rwjvvw', was being used as id previously, is internal video id
|
||||
'id': 'an-ihrem-selbstlob-erkennt-man-sie',
|
||||
'ext': 'mp3',
|
||||
'title': 'An ihrem Selbstlob erkennt man sie',
|
||||
@ -28,14 +28,14 @@ class NarandoIE(InfoExtractor):
|
||||
# webpage = self._download_webpage(url,"?")
|
||||
# print(url)
|
||||
# print('https://narando.com/articles/'+video_id)
|
||||
webpage = self._download_webpage('https://narando.com/articles/'+video_id, video_id)
|
||||
webpage = self._download_webpage('https://narando.com/articles/' + video_id, video_id)
|
||||
# TODO more code goes here, for example ...
|
||||
title = self._html_search_regex(r'<h1 class="visible-xs h3">(.+?)</h1>', webpage, 'title')
|
||||
# print(title)
|
||||
player_id = self._html_search_regex(" ".join(r'[\n\r].*https:\/\/narando.com\/r\/\s*([^"]*)'.split()), webpage, 'player_id')
|
||||
player_page = self._download_webpage('https://narando.com/widget?r='+player_id, player_id)
|
||||
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, 'download_url')
|
||||
description = self._html_search_regex(ur'<meta content="(.+?)" property="og:description" />', webpage, 'description')
|
||||
description = self._html_search_regex(r'<meta content="(.+?)" property="og:description" />', webpage, 'description')
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
|
Loading…
Reference in New Issue
Block a user