While there might be better ways to get the latest yt-dlp version...
To answer your question, you simply need to modify the script to look for yt-dlp.exe. Currently, it fetches the GitHub API page of the latest releases and looks for all things that have a browser_download_url
(which are the lines with the download links), you need to change that to look for the yt-dlp.exe
line.
Try:
for /f "tokens=1,* delims=:" %%A in ('curl -ks https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest ^| find "yt-dlp.exe"') do (curl -kOL %%B)
The official documented way of Linking to releases is by putting releases/latest/download/
in the assest link where you usually have releases/download/{release version number}/
.
So in your case, you can very simply download the file from:
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe