Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #How to get youtube playlist URL in bulk (trick explained using powershell)
- #Channel:- https://www.youtube.com/channel/UCVd9zuGwmeg4Tzz3J1XlPUQ?sub_confirmation=1
- #Youtube playlist url extractor powershell script
- #Pastebin url :- https://pastebin.com/HmRx3JMc
- $YTUrl = "<YOUR YOUTUBE PLAYLIST URL>"
- $Playlist = ((Invoke-WebRequest "$YTUrl").Links | Where {$_.class -match "playlist-video"}).href
- ForEach ($Video in $Playlist) {
- $s ="https://www.youtube.com" + $Video
- $s =$s.Substring(0, $s.IndexOf('&'))
- # bad output
- # Write-Output ($s | Out-File output_bad.txt )
- #good output
- # Write-Output ($s | Out-File -append output_using_append.txt )
- #Ascii encoded characters
- Write-Output ($s | Out-File -Encoding Ascii -append output_using_Encode_append.txt )
- #Adding output again and again without over writing
- # Write-Output ($s | Add-Content output_using_Addcontent.txt )
- #To view in powershell
- Write-Output ($s)
- }
- #Steps to use
- #Create a folder on your desktop and name it youtube_url
- #Go into the folder and on the address bar type "powershell" [ENTER]
- #Copy this code just replace the $YTUrl = "with your playlist url"
- #The play list url should look like this https://www.youtube.com/watch?v=xxxxxxxxxxxxxx&list=xxxxxxxxx-x_xxxxxxxxxxxxxxxxxxxxxxx
- #Not https://www.youtube.com/playlist?list=xxxxxxxxxxx-xx_xxxxxxxxxxxxxxxxxxxxxxxx
Add Comment
Please, Sign In to add comment