-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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/ArteTV] Separate forced subtitle tracks #9945
Conversation
Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com>
aee2a85
to
7250978
Compare
yt_dlp/extractor/arte.py
Outdated
@@ -1,6 +1,7 @@ | |||
import re | |||
|
|||
from .common import InfoExtractor | |||
from .. import join_nonempty |
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.
import it from ..utils
yt_dlp/extractor/arte.py
Outdated
'note': 'age-restricted', | ||
'url': 'https://www.arte.tv/de/videos/006785-000-A/the-element-of-crime/', | ||
'info_dict': { | ||
'id': '006785-000-A', | ||
'description': 'md5:c2f94fdfefc8a280e4dab68ab96ab0ba', | ||
'title': 'The Element of Crime', | ||
'timestamp': 1696111200, | ||
'duration': 5849, | ||
'thumbnail': 'https://api-cdn.arte.tv/img/v2/image/q82dTTfyuCXupPsGxXsd7B/940x530', | ||
'upload_date': '20230930', | ||
'ext': 'mp4', | ||
}, | ||
}, { |
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.
Don't remove this test unless you can add another age-restricted test video
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.
Can you tell me why ? This test fails as the video is no longer available on the website. May be I can comment it if you really want to keep it as a reminder...
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.
Tests are added to test specific code paths generally. If a test no longer functions, that path is no longer tested, and the test needs to be replaced. Its left in there as a reminder to be replaced
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.
So can I comment it, as a reminder, to avoid breaking the tests before to be able to execute my own test on captions ?
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.
restore the test and add 'skip': '404 Not Found'
to it
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.
Works great! I put the skipped test at the end of the tests, otherwise my test was skipped.
yt_dlp/extractor/arte.py
Outdated
'thumbnail': 'https://api-cdn.arte.tv/img/v2/image/3rR6PLzfbigSkkeHtkCZNF/940x530', | ||
'duration': 7599, | ||
'title': 'La loi de Téhéran', | ||
'alt_title': None, |
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.
If the correct expected value is None
, it doesn't need to be in the test. If not, put the correct value here and let the test fail
'alt_title': None, |
I'm assuming the patch is yours and you just checked the wrong checkbox, otherwise please note your evidence for it being in the public domain |
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.
LGTM
Note: in the future, please do not force push
On second thought, maybe a more appropriate suffix would be
Does this PR somehow also fix the "wrong language" problem described in that issue? |
You are right I will change the name to "forced" instead of "partial".
No, sorry I have read somewhere that the code for "-acc" subtitle was linked with this issue but now I don't see where I have read that. Forget it. |
Description of your pull request and other information
Add support for partial (forced) captions in ArteTV extractor.
Without :
With the support :
Otherwise you might get the partial (forced) as default (quite empty file translating only text appearing on screen), instead of the full captions.
ADD DESCRIPTION HERE
Wrong subtitles downloaded
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?