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

use web screen embed for fixing potoken functionality #4923

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Sep 16, 2024

Helps for #4734

Since potoken is generated from a YouTube embed page, YouTube has started to enforce this token on exclusive usage of WEB_EMBEDDED_PLAYER client.

Thanks to "embedUrl":"https://www.google.com/", this allows to have WEB_EMBEDDED_PLAYER working even on video that disallowed the embedding. As tested on https://www.youtube.com/watch?v=JfJYHfrOGgQ

I did found this parameter by entering the youtube video url on google.com and seeing that it worked there but not on the youtube embed page.

image

This also deactivates TVHTML5_SIMPLY_EMBEDDED_PLAYER when po_token is configured, since this doesn't work with that client.

@unixfox unixfox requested a review from a team as a code owner September 16, 2024 20:45
@unixfox unixfox requested review from syeopite and SamantazFox and removed request for a team September 16, 2024 20:45
@unixfox unixfox merged commit de918b9 into iv-org:master Sep 16, 2024
8 checks passed
@unixfox unixfox deleted the fixpotoken branch September 16, 2024 21:42
@unixfox

This comment was marked as outdated.

unixfox added a commit that referenced this pull request Sep 16, 2024
This reverts commit de918b9.
The code doesn't work as expected. Reverting
@unixfox
Copy link
Member Author

unixfox commented Sep 16, 2024

I reverted the commit. It doesn't work as expected.

The issue being that WEB screen embed doesn't provide microformat info so this fails to work. Even WEB on a blocked IP doesn't provide it either so we will have to use next endpoint in order to fetch all the information that we previously extracted from microformat (description, publishedDate and more).

@unixfox
Copy link
Member Author

unixfox commented Sep 17, 2024

Someone on matrix said that embed www.google.com does not work for all videos. Example for https://www.youtube.com/watch?v=0RyInjfgNc4

But it's a tradeoff until we can find a way to have WEB working again.

@rustynail1984
Copy link

@unixfox indeed, not all videos working on embed player. So i researched to find a working alternative.. please see it here LuanRT/YouTube.js#748 (comment)

lumpsoid pushed a commit to lumpsoid/invidious that referenced this pull request Nov 7, 2024
* use web screen embed for fixing potoken functionality

* use web screen embed only for getting streamingData + disable tv screen on po_token
lumpsoid pushed a commit to lumpsoid/invidious that referenced this pull request Nov 7, 2024
…#4923)"

This reverts commit de918b9.
The code doesn't work as expected. Reverting
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.

2 participants