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 #23011

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
[chaturbate] fix url extraction and parsing
throwaway396 authored Nov 8, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 857326d97904676eb61945523ae481536c8911ab
6 changes: 3 additions & 3 deletions youtube_dl/extractor/chaturbate.py
Original file line number Diff line number Diff line change
@@ -41,9 +41,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 = 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)