education_kids

Youtube playlist URL in bulk Script

Apr 2nd, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #How to get youtube playlist URL in bulk (trick explained using powershell)
  2. #Channel:- https://www.youtube.com/channel/UCVd9zuGwmeg4Tzz3J1XlPUQ?sub_confirmation=1
  3. #Youtube playlist url extractor powershell script
  4. #Pastebin url :- https://pastebin.com/HmRx3JMc
  5.  
  6. $YTUrl = "<YOUR YOUTUBE PLAYLIST URL>"
  7.  
  8. $Playlist = ((Invoke-WebRequest "$YTUrl").Links | Where {$_.class -match "playlist-video"}).href
  9.  
  10. ForEach ($Video in $Playlist) {
  11. $s ="https://www.youtube.com" + $Video
  12. $s =$s.Substring(0, $s.IndexOf('&'))
  13.  
  14. # bad output
  15. #    Write-Output ($s | Out-File output_bad.txt )
  16.  
  17. #good output
  18. #    Write-Output ($s | Out-File -append output_using_append.txt )
  19.  
  20. #Ascii encoded characters
  21.      Write-Output ($s | Out-File -Encoding Ascii -append output_using_Encode_append.txt )
  22.  
  23. #Adding output again and again without over writing
  24. #    Write-Output ($s | Add-Content output_using_Addcontent.txt )
  25.  
  26. #To view in powershell
  27. Write-Output ($s)
  28. }
  29.  
  30. #Steps to use
  31. #Create a folder on your desktop and name it youtube_url
  32. #Go into the folder and on the address bar type "powershell" [ENTER]
  33. #Copy this code just replace the $YTUrl = "with your playlist url"
  34. #The play list url should look like this https://www.youtube.com/watch?v=xxxxxxxxxxxxxx&list=xxxxxxxxx-x_xxxxxxxxxxxxxxxxxxxxxxx
  35. #Not https://www.youtube.com/playlist?list=xxxxxxxxxxx-xx_xxxxxxxxxxxxxxxxxxxxxxxx
Add Comment
Please, Sign In to add comment