projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[nextmedia] update AppleDailyIE tests
[youtube-dl]
/
youtube_dl
/
extractor
/
lrt.py
diff --git
a/youtube_dl/extractor/lrt.py
b/youtube_dl/extractor/lrt.py
index fca0bfef0726b472e484d7be2fd890fb5ce50f8c..e3236f7b5797ab80431ed11b7027249354015a33 100644
(file)
--- a/
youtube_dl/extractor/lrt.py
+++ b/
youtube_dl/extractor/lrt.py
@@
-2,7
+2,6
@@
from __future__ import unicode_literals
import re
from __future__ import unicode_literals
import re
-import json
from .common import InfoExtractor
from ..utils import (
from .common import InfoExtractor
from ..utils import (
@@
-22,19
+21,16
@@
class LRTIE(InfoExtractor):
'id': '54391',
'ext': 'mp4',
'title': 'Septynios Kauno dienos',
'id': '54391',
'ext': 'mp4',
'title': 'Septynios Kauno dienos',
- 'description': '
Kauno miesto ir apskrities naujienos
',
+ 'description': '
md5:24d84534c7dc76581e59f5689462411a
',
'duration': 1783,
},
'params': {
'skip_download': True, # HLS download
},
'duration': 1783,
},
'params': {
'skip_download': True, # HLS download
},
-
}
def _real_extract(self, url):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
-
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = remove_end(self._og_search_title(webpage), ' - LRT')
webpage = self._download_webpage(url, video_id)
title = remove_end(self._og_search_title(webpage), ' - LRT')
@@
-46,7
+42,9
@@
class LRTIE(InfoExtractor):
formats = []
for js in re.findall(r'(?s)config:\s*(\{.*?\})', webpage):
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',
if data['provider'] == 'rtmp':
formats.append({
'format_id': 'rtmp',
@@
-54,6
+52,7
@@
class LRTIE(InfoExtractor):
'url': data['streamer'],
'play_path': 'mp4:%s' % data['file'],
'preference': -1,
'url': data['streamer'],
'play_path': 'mp4:%s' % data['file'],
'preference': -1,
+ 'rtmp_real_time': True,
})
else:
formats.extend(
})
else:
formats.extend(