Cleanup shorts duration parsing now that YouTube has removed it #4509
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.
Cleanup shorts duration parsing now that YouTube has removed it
Pull Request Type
Related issue
NewPipeExtractor pulll request: TeamNewPipe/NewPipeExtractor#1140
Description
On the shorts channel tab and in shorts only playlists, the only way place the duration showed up was the accessibility text, unfortunately YouTube has now removed that. It used to look like this
video title - x minute(s), x second(s) - play video
orvideo title - x second(s) - play video
, now the accessibility text looks like thisvideo title - play Short
. As the information is no longer there, this pull request removes the parsing code for it.Previously the only place that we didn't have any video durations was the subscriptions page with RSS. In #3839 FreeTube started displaying the duration from the watch history, if it was available. I have now expanded that so it will also work for the shorts only playlists and on the shorts channel tab.
Screenshots
Testing
Check that errors no longer show up in the console and that durations from the watch history show up when available.
MrBeast:
https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA/shorts
MrBeast auto-generated shorts playlist:
https://www.youtube.com/playlist?list=UUSHX6OQ3DkcsbYNE6H8uQQuVA
Desktop