-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
download squarespace escaped video embeds #21859
Conversation
4b0e69c
to
15ac8c8
Compare
Thanks, @dstftw! I've updated, finding all squarespace video embeds, and escaping before searching for video URL. I've checked using these 3 URLs: http://www.ootboxford.com/ |
Thanks, @dstftw! |
afad27d
to
e1137c8
Compare
I've verified that #21294 is still present in youtube-dl version 2019.08.13, and this PR still fixes the issue. |
youtube_dl/extractor/generic.py
Outdated
@@ -2395,6 +2395,12 @@ def _real_extract(self, url): | |||
# Unescaping the whole page allows to handle those cases in a generic way | |||
webpage = compat_urllib_parse_unquote(webpage) | |||
|
|||
# unescape squarespace video embeds | |||
sqs_videos = re.findall(r'<div class="[^"]*?sqs-video-wrapper[^>]*>', webpage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re.sub
.- Regex must match any quote kinds, must allow other attributes before class.
- Add a test.
203e04f
to
ffb9bed
Compare
@dstftw thank you for your help with this! It's great to see the fix in master, and I learned a lot, too. |
…s #21859, refs #21294, refs #21802)
…s #21859, refs #21294, refs #21802)
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])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:
What is the purpose of your pull request?
Description of your pull request and other information
Captures videos embedded in Squarespace sites in escaped html, like the youtube embeds in Squarespace sites noted in issue #21294.
This can replace #21802 already initially reviewed by @dstftw.