1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-29 19:47:54 +01:00

Some coding-conventions fixes

This commit is contained in:
Markus Golser 2018-10-05 08:30:14 +02:00
parent 6149569227
commit 80da4fb798

View File

@ -1,16 +1,16 @@
# coding: utf-8 # coding: utf-8
from __future__ import unicode_literals from __future__ import unicode_literals
from .common import InfoExtractor from .common import InfoExtractor
from ..utils import ( from ..utils import (
js_to_json, js_to_json,
merge_dicts merge_dicts
) )
class RaisudtirolIE(InfoExtractor): class RaisudtirolIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?raisudtirol\.rai\.it/(?:de|it|la)/index.php\?media\=(?P<id>...[0-9]+)' _VALID_URL = r'https?://(?:www\.)?raisudtirol\.rai\.it/(?:de|it|la)/index.php\?media\=(?P<id>...[0-9]+)'
_TESTS = [ { _TESTS = [
{
'url': 'http://www.raisudtirol.rai.it/la/index.php?media=Ttv1538690400', 'url': 'http://www.raisudtirol.rai.it/la/index.php?media=Ttv1538690400',
'md5': 'cb29c5cf2a39f75a055685612260ad95', 'md5': 'cb29c5cf2a39f75a055685612260ad95',
'info_dict': { 'info_dict': {
@ -47,13 +47,13 @@ class RaisudtirolIE(InfoExtractor):
'id': video_id, 'id': video_id,
'title': title, 'title': title,
} }
jwplayer_data = self._find_jwplayer_data( webpage, video_id, transform_source=js_to_json) jwplayer_data = self._find_jwplayer_data(webpage, video_id, transform_source=js_to_json)
if jwplayer_data: if jwplayer_data:
try: try:
info = self._parse_jwplayer_data( info = self._parse_jwplayer_data(
jwplayer_data, video_id, require_title=False, base_url=url) jwplayer_data, video_id, require_title=False, base_url=url)
if info['thumbnail']: if info['thumbnail']:
info['thumbnail'] = ('http://www.raisudtirol.rai.it'+info['thumbnail']) info['thumbnail'] = ('http://www.raisudtirol.rai.it' + info['thumbnail'])
return merge_dicts(info, info_dict) return merge_dicts(info, info_dict)
except ExtractorError: except ExtractorError:
# See https://github.com/rg3/youtube-dl/pull/16735 # See https://github.com/rg3/youtube-dl/pull/16735