Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chaturbate] fix url extraction and parsing #23012

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions youtube_dl/extractor/chaturbate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import unicode_literals

import codecs
import re

from .common import InfoExtractor
Expand Down Expand Up @@ -41,9 +42,9 @@ def _real_extract(self, url):
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 = codecs.decode(m.group('url'), '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)
Expand Down