1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-07 04:40:02 +08:00

[chaturbate] fix url extraction and parsing

This commit is contained in:
throwaway396 2019-11-07 20:34:13 -05:00 committed by GitHub
parent d4f53af482
commit 857326d979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,9 +41,9 @@ class ChaturbateIE(InfoExtractor):
m3u8_urls = []
for m in re.finditer(
r'(["\'])(?P<url>http.+?\.m3u8.*?)\1', webpage):
m3u8_fast_url, m3u8_no_fast_url = m.group('url'), m.group(
'url').replace('_fast', '')
r'\\u002[27](?P<url>http.+?\.m3u8.*?)\\u002[27]', webpage):
url = bytes(m.group('url'), 'utf-8').decode('unicode-escape')
m3u8_fast_url, m3u8_no_fast_url = url, url.replace('_fast', '')
for m3u8_url in (m3u8_fast_url, m3u8_no_fast_url):
if m3u8_url not in m3u8_urls:
m3u8_urls.append(m3u8_url)