getChannelVideos() does not work
Closed this issue · 5 comments
I'm sorry but channel video search doesn't work.
Neither by using an actual channel id (e.g. 'UC6eCu3YVjhlB1mjRILyw0tQ') nor by using the example id ('PLAbeRqyTx1rIGWY13HgPyh0VF0LdoTQFp'). By the way this is a playlist id not a channel one.
I hope you can fix this :)
First, It works for me,
await usetube.getChannelVideos('UC6eCu3YVjhlB1mjRILyw0tQ', '2019-11-10T23:35:38.000Z')
return this:
{ id: '3afiDpmz62g',
original_title:
'Dieser Youtuber bewertet mein Inventar mit über $ 500,000! 🤑',
title:
'Dieser Youtuber bewertet mein Inventar mit über $ 500,000! 🤑',
artist: '',
duration: 1474,
publishedAt: 2020-05-28T05:08:44.000Z },
{ id: 'rLrFn46MOI4',
original_title:
'CS:GO - Da kann man mal clutchen! #20 - Die GEGNER wurden leider GEKAUFT!',
title: 'Die GEGNER wurden leider GEKAUFT!',
artist: 'CS:GO - Da kann man mal clutchen! #20',
duration: 601,
publishedAt: 2020-05-18T04:01:54.000Z },
... 32 more items ]
Done in 87.67s.
Now,
there might be two reasons for getChannelVideos() not to return any result :
- you sent too much query to youtube with usetube and getChannelVideos() return undefined
- you try to get too much videos from a channel (1349 videos for the channel id you try),
If so try to use published_after param like this :
await usetube.getChannelVideos('UC6eCu3YVjhlB1mjRILyw0tQ', '2019-11-10T23:35:38.000Z')
And finally, Indeed it's a playlist Id, thanks !
I prepare corrections and a getPlaylistVideos() function for the next version of usetube.
Cheers
I just finish the test for the 1349 videos channel and it takes 839.12s ... but it works.
Cool man, thank you very much. I am looking forward to next commits. I'll close this for now.
Bye :)
I just update UseTube v1.3.0.
UseTube v1.3.0 contains a getPlaylistVideos() function.
Go check the readme for more details.
Just try again
await usetube.getChannelVideos('UC6eCu3YVjhlB1mjRILyw0tQ', '2019-11-10T23:35:38.000Z')
it take while but it should works :)
cheers
Cool man, thank you :)