mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-25 02:07:44 +00:00
'Estudo em Casa' wasn't working since RTP has a lot of ways of dealing with their code
This commit is contained in:
parent
fd733f52f5
commit
a85625977d
1 changed files with 6 additions and 5 deletions
|
@ -58,7 +58,7 @@ class RTPIE(InfoExtractor):
|
||||||
# Insert the decoded HLS file URL into pure JSON string
|
# Insert the decoded HLS file URL into pure JSON string
|
||||||
json_string_for_config += '\nfile: "' + decoded_file_url + '",'
|
json_string_for_config += '\nfile: "' + decoded_file_url + '",'
|
||||||
else:
|
else:
|
||||||
# 2) ... or it's a direct M3U8 file
|
# 2) ... or the file URL is not encoded so keep it that way
|
||||||
json_string_for_config += '\n' + line
|
json_string_for_config += '\n' + line
|
||||||
|
|
||||||
elif not stripped_line.startswith("//") and not re.match('fileKey ?:', stripped_line):
|
elif not stripped_line.startswith("//") and not re.match('fileKey ?:', stripped_line):
|
||||||
|
@ -68,11 +68,12 @@ class RTPIE(InfoExtractor):
|
||||||
# Finally send pure JSON string for JSON parsing
|
# Finally send pure JSON string for JSON parsing
|
||||||
config = self._parse_json(json_string_for_config, video_id, js_to_json)
|
config = self._parse_json(json_string_for_config, video_id, js_to_json)
|
||||||
|
|
||||||
# config = self._parse_json(self._search_regex(
|
# Check if file URL is directly a string or is still inside object
|
||||||
# r'(?s)RTPPlayer ?\( ?({.+?})\);', webpage,
|
if isinstance(config['file'], str):
|
||||||
# 'player config'), video_id, js_to_json)
|
file_url = config['file']
|
||||||
|
else:
|
||||||
|
file_url = config['file']['hls']
|
||||||
|
|
||||||
file_url = config['file']
|
|
||||||
ext = determine_ext(file_url)
|
ext = determine_ext(file_url)
|
||||||
|
|
||||||
if ext == 'm3u8':
|
if ext == 'm3u8':
|
||||||
|
|
Loading…
Reference in a new issue