mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-10 03:57:25 +08:00
coding conventions
comply to coding conventions
This commit is contained in:
parent
fa9516583d
commit
087607cb78
@ -16,6 +16,7 @@ from ..utils import (
|
|||||||
parse_age_limit,
|
parse_age_limit,
|
||||||
parse_duration,
|
parse_duration,
|
||||||
try_get,
|
try_get,
|
||||||
|
js_to_json,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -437,10 +438,11 @@ class NRKTVEpisodeIE(InfoExtractor):
|
|||||||
class NRKTVSerieBaseIE(InfoExtractor):
|
class NRKTVSerieBaseIE(InfoExtractor):
|
||||||
def _extract_series(self, webpage, display_id, fatal=True):
|
def _extract_series(self, webpage, display_id, fatal=True):
|
||||||
config = self._parse_json(
|
config = self._parse_json(
|
||||||
self._search_regex(
|
js_to_json(
|
||||||
(r'INITIAL_DATA(?:_V\d)?_*\s*=\s*({.+?})\s*;',
|
self._search_regex(
|
||||||
r'({.+?})\s*,\s*"[^"]+"\s*\)\s*</script>'),
|
(r'INITIAL_DATA(?:_V\d)?_*\s*=\s*({.+?})\s*;',
|
||||||
webpage.replace("undefined", '"undefined"'), 'config', default='{}' if not fatal else NO_DEFAULT),
|
r'({.+?})\s*,\s*"[^"]+"\s*\)\s*</script>'),
|
||||||
|
webpage, 'config', default='{}' if not fatal else NO_DEFAULT)),
|
||||||
display_id, fatal=False)
|
display_id, fatal=False)
|
||||||
if not config:
|
if not config:
|
||||||
return
|
return
|
||||||
@ -515,8 +517,7 @@ class NRKTVSeriesIE(NRKTVSerieBaseIE):
|
|||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'blank',
|
'id': 'blank',
|
||||||
'title': 'Blank',
|
'title': 'Blank',
|
||||||
'description': 'Da Markus dro fra bygda var han den kuleste fyren med den fineste dama. '
|
'description': 'Da Markus dro fra bygda var han den kuleste fyren med den fineste dama. Etter kort tid er han tilbake. Og ingenting er som før. Norsk dramaserie.',
|
||||||
'Etter kort tid er han tilbake. Og ingenting er som før. Norsk dramaserie.',
|
|
||||||
'age_limit': None
|
'age_limit': None
|
||||||
},
|
},
|
||||||
'playlist_mincount': 30,
|
'playlist_mincount': 30,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user