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
[svt] Fix download of wrong episode and update test #7789
Conversation
Add a new test instead of replacing an old one. If the old test no longer works, add a |
3964b06
to
a5c8ab7
Compare
Based on patch by @dirkf in comment yt-dlp#5595 (comment) Removes some REs that now accidentially finds id in a newly introduced __NEXT_DATA__ JSON object. Update SVTPlay test to a hopefully more stable URL (Rederiet episode 1, has no expire date) Fixes yt-dlp#5595
a5c8ab7
to
6ee025b
Compare
Ok, add skip reason. No sure what is going with md5 hmm
|
Don't worry about md5, I edited my comment after realizing there was a In the future, please avoid force-pushing. All commits will squashed before merge Patch looks good |
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
Thanks. Successfully ran tests and tried a bit with some random svtplay URLs, then i noticed that there are URLs that work with the old version but not with these changes like https://www.svtplay.se/klipp/e9dBZ9R/det-kan-handa-efter-prigozjins-formodade-dod |
Re-adding Wonder if we should readd more? add test? |
Wasn't that one of the problematic patterns that was matching the wrong video ID? If we re-add more back, what is the point of this PR? Should more research be done into which patterns yield the wrong IDs? Perhaps the JSON should be properly parsed instead |
@bashonly tried and yes it break things again :( so yes some more proper less patchy solution is probably needed |
@wader Test my changes and let me know |
Tried a few old and new ones, all seem to work 👍 https://www.svtplay.se/klipp/e9dBZ9R/det-kan-handa-efter-prigozjins-formodade-dod - works |
Retried, all good 👍 |
Let me know if i should help testing etc |
Closes yt-dlp#5595 Authored by: wader, dirkf
IMPORTANT: PRs without the template will be CLOSED
Description of your pull request and other information
Based on patch by @dirkf in comment #5595 (comment) Removes some REs that now accidentially finds id in a newly introduced NEXT_DATA JSON object.
Update SVTPlay test to a hopefully more stable URL (Rederiet episode 1, has no expire date)
Fixes #5595
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:
What is the purpose of your pull request?
Copilot Summary
🤖 Generated by Copilot at 3964b06
Summary
🛠️📝🌐
Improved SVTPlayIE extractor by fixing a bug, simplifying code, and adding features.
yt_dlp/extractor/svt.py
now handles more metadata and subtitles for SVTPlay videos.Walkthrough