Closed AceAsin closed 3 years ago
Does this happen on any video id / playlist id?
Are you using VPN by any chance?
I'm not using a VPN, I'm local testing and it's happened to every URL I've tried.
For getPlaylist, on any URL, it's actually not returning anything, no error message either.
Oh I think it's because you are passing an URL instead of playlist id, you are supposed to pass playlist id.
For example if the playlist URL is https://www.youtube.com/playlist?list=PL0vfts4VzfNiI1BsIK5u7LpPaIDKMJIDN
, then the playlist id is PL0vfts4VzfNiI1BsIK5u7LpPaIDKMJIDN
, so you need to do
scrapeYt.getPlaylist("PL0vfts4VzfNiI1BsIK5u7LpPaIDKMJIDN");
instead of
scrapeYt.getPlaylist("https://www.youtube.com/playlist?list=PL0vfts4VzfNiI1BsIK5u7LpPaIDKMJIDN");
I know I'm supposed to pass a playlist id. I've been passing a playlist id and video id. It was previously working and suddenly when I checked it stopped returning information.
For getVideo, if I loop an array of id's, it will return empty objects, but it will capture only a few videos out of them all, eventually some will return information, but that's like a 1/15 chance.
If it's working fine for everyone else but not me, then it's probably just on my end, but like I said before, it was all previously working just fine, then stopped suddenly.
You mentioned a VPN, so I tried with a VPN and it works fine. I might've been rate limited on my actual IP or something.
You mentioned a VPN, so I tried with a VPN and it works fine. I might've been rate limited on my actual IP or something.
Might be true, but I never got rate limited from Youtube even after sending hundreds of request in a short time. Need to investigate more on this, but I'm planning to rewrite the whole lib with better scraping algorithm soon, so hopefully that will fix this.
Yeah, I hadn't even done any recent requests in like 2 days, so not sure either.
I'll look forward to the rewritten library when you complete it.
v2 alpha is out. There's no doc yet but you can check the CHANGELOG for breaking changes from v1.
Bug Description The getVideo and getPlaylist function are returning an empty object.
To Reproduce Add a video or playlist id to the getVideo or getPlaylist function.
Expected Behavior Returns an empty object, no error message.
Additional Context I'm not sure if it's also happening with getRelated or getUpNext. Since I don't use those functions, no testing happened. It works fine for the search function, though.