[XFileShare] Update for 2024 with new InfoExtractor features #32725
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Boilerplate: improvement/own code
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 updates the XFileShare extractor module in three steps:
adds a
_search_json()
method toInfoExtractor
matching the yt-dlp method; it uses the error diagnostic to truncate extra text from the JSON string, which might be confused by a Pythonjson
library implementation that uses a different diagnostic template;updates the common JWPlayer extraction to use
traverse_obj()
and_search_json()
, to support extracting playlists in a.load({**video1},{**video2}, ...)
fragment, and to support atransform_source
parameter in_extract_jwplayer_data()
;updates the
XFileShareIE
extractor to make use of these features.As a result, filemoon.sx can be supported as one of the known sites and its separate extractor is removed: resolves #32716.
Supersedes, closes #32452.