4 ms·
One of many possible solutions. This one no Javascript, no browser extensions, no Python, no libcurl, no "subscriptions", no BS. #!/bin/sh x(){ bs
by 1vuio0pswjnm7 4y ago
One of many possible solutions. This one no Javascript, no browser extensions, no Python, no libcurl, no "subscriptions", no BS.
#!/bin/sh
x(){ bssl client -connect www.youtube.com:443;};
x(){ openssl s_client -connect www.youtube.com:443 -ign_eof;};
read x;
printf "%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\n" \
"POST /youtubei/v1/player?key=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w HTTP/1.1" \
"Host: www.youtube.com" \
"Content-Type: x-www-form-urlencoded" \
"Content-Length: 121" \
"Connection: close" \
"" \
'{"videoId":"'$x'","context":{"client":{"clientName":"ANDROID","clientVersion":"17.10.35","androidSdkVersion":30}}}' \
|x|sed -n "/itag=22&/{s/.*: ./<a href=/;s/\",/>$x<\/a>/p;}"
Usage:
echo RfNdaYqVxR0|1.sh > 1.htm
chrome ./1.htm
- chaxor 4y agoI don't know anything about web tbh - what is that "key=AIzaSy[...]" bit? Is that a user id for duckduckgo private watching type of thing?
- 1vuio0pswjnm7 4y agoNo, nothing personally identifiable about the so-called key. Every person who visits www.youtube.com uses the same one; it's public. Anyone can see it in the HTML page source for www.youtube.com. No need to be "logged in" or whatever the latest scheme is to track people for advertising purposes.