star-39 / moe-sticker-bot

A Telegram bot that imports LINE/kakao stickers or creates/manages new sticker set.
GNU General Public License v3.0
272 stars 31 forks source link

Can't Import Kakaotalk stickers #37

Open ReturnToFirst opened 4 months ago

ReturnToFirst commented 4 months ago

ScreenShot 2024-06-04 183006

Bot can't download kakaotalk's sticker.

It seems like endpoint that download kakaotalk's stickers zip file(item.kakaocdn.net)'s API was changed.

ReturnToFirst commented 4 months ago

I checked API, There is change on way to get Emoticon ID in Kakao emoticon store. It change every request, need to find some way to 'real' emoticon id.

laggykiller commented 3 months ago

https://github.com/laggykiller/sticker-convert/blob/1be9034ebede7be2a35163e71a839e5f1f740b20/src/sticker_convert/downloaders/download_kakao.py#L45-L86

The fake emoticon id needs to be converted to real emoticon id by javascript function emoticonDeepLink() involving xor and adding. The fake emoticon id and the numbers inside that function are different everytime, but the real emoticon id calculated are the same everytime.

The-pure-Groot commented 3 months ago

I have same problem. Do you know how it works?

laggykiller commented 3 months ago

@star-39 I have written the solution in the comment above, you may take some inspiration from my code

Others may use http://github.com/laggykiller/sticker-convert while this problem is solved