mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-17 11:14:09 +00:00
[lrt] Fix missing provider key
Also, modernize a bit.
This commit is contained in:
parent
caf90bfaa5
commit
adf3c58ad3
@ -2,7 +2,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import json
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
@ -28,7 +27,6 @@ class LRTIE(InfoExtractor):
|
|||||||
'params': {
|
'params': {
|
||||||
'skip_download': True, # HLS download
|
'skip_download': True, # HLS download
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
@ -44,7 +42,9 @@ class LRTIE(InfoExtractor):
|
|||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for js in re.findall(r'(?s)config:\s*(\{.*?\})', webpage):
|
for js in re.findall(r'(?s)config:\s*(\{.*?\})', webpage):
|
||||||
data = json.loads(js_to_json(js))
|
data = self._parse_json(js, video_id, transform_source=js_to_json)
|
||||||
|
if 'provider' not in data:
|
||||||
|
continue
|
||||||
if data['provider'] == 'rtmp':
|
if data['provider'] == 'rtmp':
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': 'rtmp',
|
'format_id': 'rtmp',
|
||||||
|
Loading…
Reference in New Issue
Block a user