summary refs log tree commit diff
diff options
context:
space:
mode:
authorNaglis Jonaitis <njonaitis@gmail.com>2015-01-05 02:55:12 +0200
committerNaglis Jonaitis <njonaitis@gmail.com>2015-01-05 02:55:12 +0200
commitadf3c58ad31e7376f085271a02fdfe56b1e75989 (patch)
treefcf3d721cc46b98aaffcda6834d16c242444438a
parentcaf90bfaa5434d9ff7035d8575b842b076178ca3 (diff)
downloadyoutube-dl-adf3c58ad31e7376f085271a02fdfe56b1e75989.tar.gz
youtube-dl-adf3c58ad31e7376f085271a02fdfe56b1e75989.tar.xz
youtube-dl-adf3c58ad31e7376f085271a02fdfe56b1e75989.zip
[lrt] Fix missing provider key
Also, modernize a bit.
-rw-r--r--youtube_dl/extractor/lrt.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/lrt.py b/youtube_dl/extractor/lrt.py
index d72d470aa..9c2fbdd96 100644
--- a/youtube_dl/extractor/lrt.py
+++ b/youtube_dl/extractor/lrt.py
@@ -2,7 +2,6 @@
 from __future__ import unicode_literals
 
 import re
-import json
 
 from .common import InfoExtractor
 from ..utils import (
@@ -28,7 +27,6 @@ class LRTIE(InfoExtractor):
         'params': {
             'skip_download': True,  # HLS download
         },
-
     }
 
     def _real_extract(self, url):
@@ -44,7 +42,9 @@ class LRTIE(InfoExtractor):
 
         formats = []
         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':
                 formats.append({
                     'format_id': 'rtmp',