More Playlist Error fix

This commit is contained in:
killer069
2021-08-24 20:14:51 +05:30
parent c83897ff2a
commit 50f864c13f
3 changed files with 3 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ export async function playlist_info(url : string) {
if(url.search('(\\?|\\&)list\\=') === -1) throw new Error('This is not a PlayList URL')
let Playlist_id = url.split('list=')[1].split('&')[0]
if(Playlist_id.length !== 34) throw new Error('This is not a PlayList URL')
if(Playlist_id.length !== 34 || Playlist_id.startsWith('PL')) throw new Error('This is not a PlayList URL')
let new_url = `https://www.youtube.com/playlist?list=${Playlist_id}`
let body = await url_get(new_url)