I want to write a script which runs in the background and monitores changes in a youtube playlist that i'm interested in.
I have some trouble getting a list of videos in that playlist. When I want to download it, i get an accept-cookies page instead of the playlist content.
What's interesting - when i want to download a single video content (like title, description) I have no problem.
I use below code from this tread:
Code: Select all
MsgBox, % YouTubeTitle("https://youtu.be/dQw4w9WgXcQ")
return
YouTubeTitle(url) {
hObject := ComObjCreate("WinHttp.WinHttpRequest.5.1")
hObject.Open("GET", url)
hObject.Send()
RegExMatch(hObject.ResponseText, "(?<=title>).*?(?= - YouTube</title>)", title)
return title
}
[Mod action: Moved topic from AHK v2 help to v1 help, based on posted code.]