My previous question was about fetching page title in lua using the socket.http module. The question lies here. Previously, youtube pages led me to
socket.http
I believe this line should be changed:
header = { host= "youtube.com" }
To:
header = { host= "www.youtube.com" }
After that, works for me.