Code: Select all
ypwb := ComObjCreate("InternetExplorer.Application")
ypwb.Visible := true
ypwb.Navigate("https://www.youtube.com/results?search_query=Song")
while ypwb.busy or ypwb.ReadyState !=4
sleep, 10
URL := pwb.document.getElementsByClassName("yt-uix-tile-link yt-ui-ellipsis yt-ui-ellipsis-2 yt-uix-sessionlink spf-link ").item(0).href
MsgBox % URL