-
Notifications
You must be signed in to change notification settings - Fork 10k
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
TVP extractor redacted for new url schema and extract method #32028
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for your work !
I've made a few suggestions and will enable the CI test once you've had time to address them.
what we do in yt-dlp is, we take the |
But see yt-dlp/yt-dlp#6987, where the external ID just gives (in Polish) "payment required". @bibiak1, I should also have asked you to complete the "Explanation", especially since there's no related issue. Is this a new scheme or an alternative as suggested above? If the latter, it should be built into the existing |
It's a news scheme. I have checked unpayed content only. I can try to implement log-in as I was not focusing on that |
Let's back-port the yt-dlp version that was just committed using the new scheme. I'd like try to keep the two as similar as possible. If you fancy doing that please go ahead. The diff from yt-dlp should apply straightforwardly to the base yt-dl code; then any Python3-only syntax ( |
This comment was marked as outdated.
This comment was marked as outdated.
[skip ci]
* pull changes from yt-dlp/yt-dlp#6989, thanks selfisekai * use `traverse_obj()` for safer extraction * fix tests that are not blocked from UK Co-authored-by: selfisekai
Add `txt_or_none()` shim
@bibiak1, I've merged the yt-dlp changes. If you're able to check (and fix if necessary) the geo-blocked tests, that would be great. Let me know if you want to add login code; or you could make a separate PR? |
hmmmm. tested from NL. turns out https://vod.tvp.pl/filmy-dokumentalne,163/krzysztof-krawczyk--cale-moje-zycie,332512 plays in browser if logged in to a free account. the geoblock error message I'm getting when not logged in is this:
so I guess they wanted to implement this but someone made an assumption that an account logged in means SVOD and not logged in means AVOD? login is by cookies so |
From UK, the extractor just sees the truthy |
that's on embed (tvplayer2 api), this workaround is specific to VOD playlist api |
When I run that URL in the current PR, it's handled by The data from the VOD API includes these values:
The test case https://vod.tvp.pl/website/krzysztof-krawczyk-cale-moje-zycie,51374466 is redirected via |
youtube_dl/extractor/tvp.py
Outdated
elif fatal: | ||
raise RegexNotFoundError('Unable to extract %s' % _name) | ||
else: | ||
self._downloader.report_warning('unable to extract %s' % _name + bug_reports_message()) |
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.
self._downloader.report_warning('unable to extract %s' % _name + bug_reports_message()) | |
self.report_warning('unable to extract %s' % _name + bug_reports_message()) |
It works from PL without logging in. Most likely it's geo location oriented. If you are not from PL IP address then you need to login. I read all comments and do not know what i suppose to do. tvp.py code starting line 255 (class TVPappIE) is mine. I've just added support for new schema/player and didn't want to change anything that exist before. |
Co-authored-by: dirkf <fieldhouse@gmx.net>
Co-authored-by: dirkf <fieldhouse@gmx.net>
Co-authored-by: dirkf <fieldhouse@gmx.net>
Co-authored-by: dirkf <fieldhouse@gmx.net>
Co-authored-by: dirkf <fieldhouse@gmx.net>
Co-authored-by: dirkf <fieldhouse@gmx.net>
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.
Workflow tested. All OK
@dirkf can you merge this pull req? |
@dirkf can this be reviewed and merged in? 🙏 |
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.
Please proceed with merge
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
This PR switches VOD extraction to new APIs.
The original proposal added an extractor
TVappIE
. After alignment with the yt-dlp extractor from yt-dlp/yt-dlp#6989, there are now two new extractors,TVPStreamIE
andTVPVODVideoIE
, plusTVPVODSeriesIE
replacingTVPWebsiteIE
: thanks @selfisekai.These changes have been applied over the aligned code:
traverse_obj()
for safer extractionCompared with the yt-dlp extractor,
None
), since it seems to apply to one-off showsid
s, a real test has been added forTVPStreamIE
.