Skip to content
Advertisement

How to get 3 latest videos from youtube channel?

I know there are too many similar question like in my title, but I have problem that prevents me to make it works.

I tested with three accounts and all of them in one day exceeded “request quota”. I can’t even understand that how it was happen?

I’m using this code to get 3 latest videos from youtube channel:

JavaScript

Script works for some hour and after that result of code disappears and I get message that tell me I reached quota.

I created 3 new accounts, created only Youtube API v3 service for a project, but I can’t even use it at all!

How to make this Youtube API V3 to work without any troubles to keep the script running?

Advertisement

Answer

seems easy to parse it from the html video list, the xpath //li/ul/li[contains(@class,'channels-content-item')] gets you the list of videos, with a video li context node, the xpath .//*[contains(@class,'yt-lockup-title')]/a gets you the title and .//*[@data-context-item-id] gets you the node holding the id in the “data-context-item-id” attribute, putting it all together we get:

JavaScript

which outputs:

JavaScript

gotdammit im bored.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement