Comments (7)
thank you for the kind words!
Currently, the only way I have found to get a youtube video's length is by accesing its value in the DOM via the .ytd-thumbnail-overlay-time-status-renderer
selector and it takes a little bit to be loaded.
Do you think there are other ways to get this value before it is rendered to the DOM?
from youtube-filter.
Yeah, I actually linked you the network file path in my original comment
from youtube-filter.
Oops, sorry about that!
I confess I'm still not quite sure how to access that via Javascript though. Would you please give me some hint on this?
A bit off topic, I was able to find multiple objects at window
starting with yt(something). Some of them may contain info about all the displayed videos!
from youtube-filter.
Found it!
window["ytInitialData"].contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents
This object contain accurate and instant information of all videos. That is amazing. I will play around with it.
Thank you!
from youtube-filter.
No problem! Glad I could help :)
from youtube-filter.
Hey @Bengejd , I hope you're doing well!
After a long time I decided to return to this project. I'm creating a new repository and starting from scratch with webpack.
Anyhow, I came across a situation and thought I'd ask if you have any ideas how I can move through this:
I managed to access the Youtube object with the data for timestamps. The issue is that it's huge and deeply nested. Here is an example.
I need to find a way to access all keys with the name of "videoRenderer" and add them to a single array of objects, but I'm stuck on this. Do you have any suggestions?
Thank you!
from youtube-filter.
Update: I found a solution after asking it on stackoverflow!
I'll keep you updated about the new version, it's much faster than the previous one.
from youtube-filter.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-filter.