Skip to content
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

Restore compability for YouTube in other languages #25

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

execvpe
Copy link
Contributor

@execvpe execvpe commented Feb 18, 2024

Hi,

to my understanding, there is no requirement for these specific regex checks that were added in recently.

www.youtube.com##ytd-reel-shelf-renderer (and m.youtube.com##ytm-reel-shelf-renderer) by itself should - as the name implies - only blocks the rendering of the reel shelf, nothing else should be affected.

In addition to that, comparing against the hard coded string Shorts remixing this video only works, if you use YouTube in an English environment.

For example, the filter did not affect German YouTube which has another text displayed due to localization.

20240218_213040

Feel free to correct me, if I'm wrong. :)

@gijsdev
Copy link
Owner

gijsdev commented Feb 19, 2024

I don't really like adding filters which don't specifically mention Shorts in it. Maybe YouTube will use the same element for something else, which then breaks said thing of course. It should work by checking for the words "Shorts" and "Remix" instead of the entire sentence.

@execvpe execvpe changed the title Resore compability for YouTube in other languages Restore compability for YouTube in other languages Feb 19, 2024
@execvpe
Copy link
Contributor Author

execvpe commented Feb 19, 2024

I don't really like adding filters which don't specifically mention Shorts in it.

Understandable. I fixed the code, so that the regex will check for "Shorts" and "Remix" in that order. It should work for most languages now.

While researching I discovered, that there is a Shorts section beside the comments too, which was not affected by the changed regex alone, because its missing ytd-structured-description-content-renderer. That's the reason I removed that bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants