On Tue, Apr 1, 2025 at 12:31 AM Samuel Sieb <sam...@sieb.net> wrote: > > On 3/31/25 7:00 PM, Jeffrey Walton wrote: > > On Mon, Mar 31, 2025 at 9:56 PM Tim via users > > <users@lists.fedoraproject.org> wrote: > >> > >> Tim: > >>>> For one like https://www.youtube.com/watch?v=-ob9LHPEaKY you can type > >>>> ob9LHPEaKY into the YouTube search gadget and it will find that clip. > >>>> And for https://www.youtube.com/watch?v=D-_qS_3KXBA typing just this > >>>> _qS_3KXBA bit into the search gadget works. > >> > >> Go Canes: > >>> If you put the full 11-character "key" in double-quotes in the youtube > >>> search field it should work. > >> > >> "-ob9LHPEaKY" worked (11 chars), but "D-_qS_3KXBA" (11 chars) didn't, > >> though "-_qS_3KXBA" (10 chars) does. > > > > $ echo -n '-ob9LHPEaKY' | base64 -d > > base64: invalid input > > > > $ echo -n 'D-_qS_3KXBA' | base64 -d > > base64: invalid input > > > > $ echo -n '-_qS_3KXBA' | base64 -d > > base64: invalid input > > It's "web-safe" base64, so you have to translate two characters. It > should also have a "=" at the end to make it 12 characters, but the > decoder seems to accept it anyway. However, you're only going to get 7 > bytes of binary data. It's not something readable. > > echo -n '-ob9LHPEaKY' | tr _- /+ | base64 -d | od -tx1 > 0000000 fb fa 92 ff 72 97 04
It sounds like you are talking about the Base64 URL encoder from <http://tools.ietf.org/html/rfc4648#section-5>. The character repertoire includes minus ('-') and underscore ('_'). The original Base64 encoder from <http://tools.ietf.org/html/rfc4648#section-4> uses plus ('+') and slash ('/'). Jeff -- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue