[Melissa Zhang]> Bulk-delete Watch Later Playlist
Sometimes I don't want to watch the dregs of my "Watch later" playlist and just want to delete them. But YouTube doesn't give you an easy way to do this. I'm on a Windows PC with dual monitor, for context.
Steps:
-
Download AutoIt (minimal installment is fine). Put the code below in a file with extension ".au3". Keep both the code and the file location open, so that you can edit the code and run the program later, respectively.
-
Open your Watch later (WL) playlist. Find the (x,y) coordinates of the vertical ellipsis to the right of the first video you want to delete; write this down. Click on it, and find the (x,y) coordinates of the "Remove from Watch later" button in the drop down menu; write this down.
-
Put those coordinates into the code (see in-code comments to find where). You can also edit other stuff:
- If you want this process to go slowly, increase the wait_time. Use ESC to escape AutoIt if things to terribly wrong. Or, if you want to be extra careful, you can first comment out (using a semi-colon) all the MouseClick() statements and just watch how the mouse would move on your screen before you uncomment the click statements and actually run the code.
- Change num_videos to the number of videos you want to delete (including and following the first one you got the coordinates from).
-
Run the program. If you're not on a dual desktop, you could of course shrink your windows to have both the File Explorer and WL window open at the same time. Or you could use AutoIt to wait until WL is the active window.
Code:
The following was modified from the AutoIt Wiki.
Global $CheckSwap = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")
Global $MousePrimary, $MouseSecondary
If $CheckSwap = 1 Then
$MousePrimary = "right"
$MouseSecondary = "left"
Else
$MousePrimary = "left"
$MouseSecondary = "right"
EndIf
; ************************************************* ;
; Change your settings here ;
; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ;
Global $ExitKey = "{ESC}"
Global $ClickMouse = $MousePrimary
Global $ClickHamster = $MouseSecondary
HotKeySet($ExitKey, '_Exit') ; press $ExitKey to escape AutoIt
; =========================
; wait_time big = takes longer, more time to ESC if needed
Global $wait_time = 100 ; milliseconds
; input the position of the ellipsis and remove buttons
Global $WLellipsis = [1475, 315]
Global $WLremove = [1475, 450]
; total number of videos from top of WL list to delete
Global $numWLvideos = 10
For $i = 1 To $numWLvideos
MouseMove ($WLellipsis[0], $WLellipsis[1])
sleep($wait_time)
MouseClick($ClickMouse)
sleep($wait_time)
MouseMove ($WLremove[0], $WLremove[1])
sleep($wait_time)
MouseClick($ClickMouse)
sleep($wait_time)
Next
; =====================