You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the getHashtag method with certain Cyrillic (non-ASCII) characters, the request fails with a 400 status code. The issue appears to be related to the encoding process in the getHashtag method, specifically in the parameter encoding step:
The encoded parameters have different structures for working and non-working cases. The encoding process (u8ToBase64 followed by encodeURIComponent) seems to handle some Cyrillic strings correctly while failing with others.
Test Cases
Working hashtags:
биток, мир (Cyrillic word)
crypto (Latin characters)
Failing hashtags:
биткоин, море (Cyrillic word)
Other Cyrillic hashtags
Environment
YouTube.js version: 12.2.0
Node.js version: 23
Operating System: Linux
Additional Context
The same hashtags work correctly on YouTube's web interface
The issue seems to be related to the encoding process in the getHashtag method
This issue is specific to the getHashtag endpoint
The difference in encoded parameters between working and non-working cases suggests a potential issue with the encoding pipeline for certain Cyrillic strings
Steps to reproduce
Description
When using the
getHashtag
method with certain Cyrillic (non-ASCII) characters, the request fails with a 400 status code. The issue appears to be related to the encoding process in thegetHashtag
method, specifically in the parameter encoding step:Reproduction Steps
getHashtag
with Cyrillic charactersDebug Information
I've noticed different encoding results for working vs non-working hashtags:
Working hashtag (#биток):
Failing hashtag (#биткоин):
The encoded parameters have different structures for working and non-working cases. The encoding process (
u8ToBase64
followed byencodeURIComponent
) seems to handle some Cyrillic strings correctly while failing with others.Test Cases
Working hashtags:
биток
,мир
(Cyrillic word)crypto
(Latin characters)Failing hashtags:
биткоин
,море
(Cyrillic word)Environment
Additional Context
getHashtag
methodgetHashtag
endpointFailure Logs
Expected behavior
Current behavior
Version
Default
Anything else?
No response
Checklist
The text was updated successfully, but these errors were encountered: