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

[chaturbate] fix url extraction and parsing #23011

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Nov 8, 2019

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Fixes issue #23010

The chaturbate extractor broke some time this evening. The regex looking for .m3u8 URLs no longer matched anything. Additionally, the URL now needs a bit of extra processing.

The page source contains a large JavaScript string containing an encoded JSON object. The nested quotes, as well as other special characters, are encoded as e.g. \u0022. So, we match the URL delimited by \u0022 or \u0027 (double or single quotes, respectively) and then decode any \uXXXX sequences in the match group.

@ghost ghost closed this Nov 8, 2019
@ghost
Copy link
Author

ghost commented Nov 8, 2019

This patch was not compatible with python 2. I have a solution and will create a new pull request shortly.

Edit: this pull request is now superceded by #23012

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants