-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
[FEATURE] Youtube channels exclude shorts from showing #106
Comments
Maybe the YouTube RSS link won't be added to shorts |
an idea extract the ytp-time-duration from html Add function
Update FetchYoutubeChannelUploads
Added a function fetchVideoDurationFromHTML to fetch video duration by parsing the HTML content of the video page. |
@bigsk1 How to deal with delays? The fetchVideodurationFromHtml function requires an additional network request, and there is also CPU consumption for regular parsing of HTML (850KB+) |
Perhaps leaving it to Chrome for processing would be a better choice, please refer to: iframe_api |
Yes it's alot to check all html and parse. The ytp-time-duration isn't being shown anyway I found out when scraping, What about this approach, need to see the size of requests Fetches the video duration by making an HTTP request to the video page and extracting the duration from the embedded ytInitialPlayerResponse JSON object. This approach efficiently filters out YouTube Shorts by checking the video duration using the embedded metadata in the HTML
|
Also have an idea for a cloudflare worker to get the video length and do the heavy lifting Cloudflare Worker: The worker fetches the HTML of a YouTube video page, extracts the duration, and returns it. The Cloudflare Worker script will fetch the HTML content of the YouTube video page and extract the duration from the ytInitialPlayerResponse object. Worker Script
youtube.go
|
Hey, This is something that I've been annoyed by as well ever since I added the videos widget. I don't know of a reasonable way to solve this problem that doesn't involve using YouTube's API. Having to make an extra request for every single video is extremely inefficient and would either result in timeouts, slowed page loads or hitting rate limits. I have 37 channels added to one of my videos widgets, at 15 videos per feed that's 555 extra requests. Those requests would prevent the entire page from loading until they're done. I'm sure there's plenty of people with widgets that have more than 37 channels in them which would exacerbate the issue even further. Maybe someone can chime in with a different approach to tackling this problem. |
I wonder if public or local invidious instances can be used to get videos as an alternative and have a way to directly sort video types |
I would also like to share my support for adding a way to block shorts please. |
I'm not sure if making HEAD requests instead of GET requests would make it acceptable to have 1 request by video (probably not given the "rate limits" argument) but if so, doing a HEAD request on https://www.youtube.com/shorts/<VIDEO_ID> gives a 200 on a short video and a 303 on regular videos. It could help discriminate videos without having to get the full body data for each request |
Opened a PR for this: #176 |
Not sure if there is a way to not see shorts from youtube channels and only actual videos.
The text was updated successfully, but these errors were encountered: