I'm trying to scrape my youtube history, but it doesn't work as I want

Just trying to scape the whole text of a Video Container, but either the "infinite scroll" cancels or he doesn't and I get no "data"

It should be easy but somehow it isn't

{"_id":"ythistory","startUrl":["https://www.youtube.com/feed/history"],"selectors":[{"id":"html","type":"SelectorHTML","parentSelectors":["_root"],"selector":"div#dismissable.ytd-video-renderer","multiple":true,"regex":"","delay":0},{"id":"scroll","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"div#dismissable.ytd-video-renderer","multiple":true,"delay":2000}]}

Try this one, which grabs the past 10 days (actually a few more). You can tweak the days by changing the number in the scroller:

ytd-item-section-renderer:nth-of-type(-n+10) ytd-video-renderer div.text-wrapper

Sitemap:
{"_id":"forum-youtube-history","startUrl":["https://www.youtube.com/feed/history"],"selectors":[{"id":"Separate scroller","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"ytd-item-section-renderer:nth-of-type(-n+10) ytd-video-renderer div.text-wrapper","multiple":true,"delay":"4000"},{"id":"Day wrappers","type":"SelectorElement","parentSelectors":["_root"],"selector":"ytd-item-section-renderer","multiple":true},{"id":"Day","type":"SelectorText","parentSelectors":["Day wrappers"],"selector":"div#title","multiple":false,"regex":""},{"id":"Video wrappers","type":"SelectorElement","parentSelectors":["Day wrappers"],"selector":"div.text-wrapper","multiple":true},{"id":"Title and Link","type":"SelectorLink","parentSelectors":["Video wrappers"],"selector":"a.yt-simple-endpoint.ytd-video-renderer","multiple":false}]}

1 Like

This works great man. Thank you very much <3. But could u add a column with the time of the video, I would appreciate it.