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

Short detection is not consistent #13

Open
yadomi opened this issue Dec 31, 2024 · 1 comment
Open

Short detection is not consistent #13

yadomi opened this issue Dec 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yadomi
Copy link
Owner

yadomi commented Dec 31, 2024

Some short end up in the feed even when ALLOW_SHORT is set to false

@yadomi yadomi added the bug Something isn't working label Dec 31, 2024
@yadomi
Copy link
Owner Author

yadomi commented Dec 31, 2024

Might be the way the video/short is uploaded.
Example, this video is available both as short and as regular video

https://www.youtube.com/shorts/3EOd4lVWrSI
https://www.youtube.com/video/3EOd4lVWrSI

tube/main.ts

Lines 344 to 352 in 993abb4

async is_short(videoId: string) {
const response = await fetch(`https://www.youtube.com/shorts/${videoId}`, {
redirect: "manual",
headers: {
"User-Agent": UA,
},
});
return response.status === 200;
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant