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

[ie/reddit] Fix subtitle extraction #10006

Merged
merged 8 commits into from
May 23, 2024
Merged

Conversation

kclauhk
Copy link
Contributor

@kclauhk kclauhk commented May 22, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Fix subtitle extraction:

  • adding '%2CsubsAll' to hls_playlist_url because subtitle is not listed in HLS manifest if parameter 'f' of the url does not contain it
  • "caption-url" is provided in the webpage. Because the extractor does not fetch the webpage, the url is constructed (caption_url) and used after validation
Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • 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?

- modify `hls_playlist_url` because subtitle is not provided if parameter 'f' does not contain '%2CsubsAll'
- use `caption_url`, if valid, as the alternative url of subtitle
yt_dlp/extractor/reddit.py Outdated Show resolved Hide resolved
yt_dlp/extractor/reddit.py Outdated Show resolved Hide resolved
yt_dlp/extractor/reddit.py Outdated Show resolved Hide resolved
@bashonly bashonly added site-bug Issue with a specific website pending-fixes PR has had changes requested labels May 22, 2024
kclauhk and others added 3 commits May 23, 2024 10:01
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly bashonly removed the pending-fixes PR has had changes requested label May 23, 2024
@bashonly bashonly self-assigned this May 23, 2024
@bashonly bashonly merged commit 82f4f44 into yt-dlp:master May 23, 2024
6 checks passed
@kclauhk kclauhk deleted the fix/reddit-subs branch May 24, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants