sticker-convert 2.13.0__tar.gz → 2.13.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. {sticker_convert-2.13.0/src/sticker_convert.egg-info → sticker_convert-2.13.1.0}/PKG-INFO +7 -7
  2. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/README.md +3 -2
  3. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/requirements.txt +3 -4
  4. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/cli.py +2 -0
  5. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/converter.py +1 -1
  6. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_line.py +8 -4
  7. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/advanced_compression_window.py +1 -1
  8. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/kakao_get_auth_window.py +25 -4
  9. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/viber_get_auth_window.py +15 -0
  10. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/help.json +1 -1
  11. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_discord_auth.py +1 -1
  12. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_kakao_desktop_auth.py +36 -41
  13. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_viber_auth.py +2 -4
  14. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/telegram_api.py +3 -1
  15. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/telethon_setup.py +18 -7
  16. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/chrome_remotedebug.py +9 -23
  17. sticker_convert-2.13.1.0/src/sticker_convert/utils/chromiums/linux.py +52 -0
  18. sticker_convert-2.13.1.0/src/sticker_convert/utils/chromiums/osx.py +68 -0
  19. sticker_convert-2.13.1.0/src/sticker_convert/utils/chromiums/windows.py +45 -0
  20. sticker_convert-2.13.1.0/src/sticker_convert/utils/process.py +231 -0
  21. sticker_convert-2.13.1.0/src/sticker_convert/version.py +3 -0
  22. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0/src/sticker_convert.egg-info}/PKG-INFO +7 -7
  23. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert.egg-info/SOURCES.txt +3 -0
  24. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert.egg-info/requires.txt +3 -4
  25. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/tests/test_download.py +14 -0
  26. sticker_convert-2.13.0/src/sticker_convert/utils/process.py +0 -187
  27. sticker_convert-2.13.0/src/sticker_convert/version.py +0 -3
  28. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/LICENSE +0 -0
  29. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/MANIFEST.in +0 -0
  30. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/pyproject.toml +0 -0
  31. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/setup.cfg +0 -0
  32. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/__init__.py +0 -0
  33. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/__main__.py +0 -0
  34. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/definitions.py +0 -0
  35. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/__init__.py +0 -0
  36. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_band.py +0 -0
  37. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_base.py +0 -0
  38. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_discord.py +0 -0
  39. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_kakao.py +0 -0
  40. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_signal.py +0 -0
  41. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_telegram.py +0 -0
  42. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/downloaders/download_viber.py +0 -0
  43. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui.py +0 -0
  44. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/__init__.py +0 -0
  45. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/__init__.py +0 -0
  46. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/comp_frame.py +0 -0
  47. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/config_frame.py +0 -0
  48. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/control_frame.py +0 -0
  49. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/cred_frame.py +0 -0
  50. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/input_frame.py +0 -0
  51. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/output_frame.py +0 -0
  52. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/progress_frame.py +0 -0
  53. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/frames/right_clicker.py +0 -0
  54. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/gui_utils.py +0 -0
  55. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/__init__.py +0 -0
  56. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/base_window.py +0 -0
  57. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/discord_get_auth_window.py +0 -0
  58. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/line_get_auth_window.py +0 -0
  59. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/gui_components/windows/signal_get_auth_window.py +0 -0
  60. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +0 -0
  61. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/.gitignore +0 -0
  62. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/README.md +0 -0
  63. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers/Info.plist +0 -0
  64. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +0 -0
  65. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +0 -0
  66. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +0 -0
  67. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +0 -0
  68. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Sticker 1.png +0 -0
  69. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +0 -0
  70. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Sticker 2.png +0 -0
  71. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +0 -0
  72. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Sticker 3.png +0 -0
  73. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/App-Store-1024x1024pt.png +0 -0
  74. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +0 -0
  75. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-App-Store-1024x768pt.png +0 -0
  76. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-67x50pt@2x.png +0 -0
  77. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPad-Pro-74x55pt@2x.png +0 -0
  78. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@2x.png +0 -0
  79. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages-iPhone-60x45pt@3x.png +0 -0
  80. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@2x.png +0 -0
  81. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages27x20pt@3x.png +0 -0
  82. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@2x.png +0 -0
  83. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Messages32x24pt@3x.png +0 -0
  84. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPad-Settings-29pt@2x.png +0 -0
  85. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-Settings-29pt@3x.png +0 -0
  86. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/iPhone-settings-29pt@2x.png +0 -0
  87. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +0 -0
  88. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -0
  89. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  90. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcuserdata/niklaspeterson.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  91. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +0 -0
  92. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/job.py +0 -0
  93. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/job_option.py +0 -0
  94. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/NotoColorEmoji.ttf +0 -0
  95. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/appicon.icns +0 -0
  96. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/appicon.ico +0 -0
  97. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/appicon.png +0 -0
  98. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/compression.json +0 -0
  99. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/emoji.json +0 -0
  100. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/input.json +0 -0
  101. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/memdump_linux.sh +0 -0
  102. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/memdump_windows.ps1 +0 -0
  103. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/resources/output.json +0 -0
  104. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/__init__.py +0 -0
  105. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/compress_wastickers.py +0 -0
  106. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/upload_base.py +0 -0
  107. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/upload_signal.py +0 -0
  108. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/upload_telegram.py +0 -0
  109. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/upload_viber.py +0 -0
  110. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/uploaders/xcode_imessage.py +0 -0
  111. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_kakao_auth.py +0 -0
  112. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_line_auth.py +0 -0
  113. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/auth/get_signal_auth.py +0 -0
  114. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/callback.py +0 -0
  115. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/emoji.py +0 -0
  116. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/cache_store.py +0 -0
  117. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/json_manager.py +0 -0
  118. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/json_resources_loader.py +0 -0
  119. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/metadata_handler.py +0 -0
  120. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/run_bin.py +0 -0
  121. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/files/sanitize_filename.py +0 -0
  122. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/media/apple_png_normalize.py +0 -0
  123. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/media/codec_info.py +0 -0
  124. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/media/decrypt_kakao.py +0 -0
  125. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/media/format_verify.py +0 -0
  126. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/singletons.py +0 -0
  127. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert/utils/url_detect.py +0 -0
  128. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert.egg-info/dependency_links.txt +0 -0
  129. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert.egg-info/entry_points.txt +0 -0
  130. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/src/sticker_convert.egg-info/top_level.txt +0 -0
  131. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/tests/test_compression.py +0 -0
  132. {sticker_convert-2.13.0 → sticker_convert-2.13.1.0}/tests/test_export.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sticker-convert
3
- Version: 2.13.0
3
+ Version: 2.13.1.0
4
4
  Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, Discord, iMessage. Written in Python.
5
5
  Author-email: laggykiller <chaudominic2@gmail.com>
6
6
  Maintainer-email: laggykiller <chaudominic2@gmail.com>
@@ -367,7 +367,7 @@ Requires-Dist: aiolimiter~=1.2.1
367
367
  Requires-Dist: anyio~=4.9.0
368
368
  Requires-Dist: apngasm_python~=1.3.2
369
369
  Requires-Dist: av>=13.1.0
370
- Requires-Dist: beautifulsoup4~=4.13.3
370
+ Requires-Dist: beautifulsoup4~=4.13.4
371
371
  Requires-Dist: cryptg~=0.5.0.post0
372
372
  Requires-Dist: rookiepy~=0.5.6
373
373
  Requires-Dist: httpx~=0.28.1
@@ -376,16 +376,15 @@ Requires-Dist: memory-tempfile~=2.2.3
376
376
  Requires-Dist: mergedeep~=1.3.4
377
377
  Requires-Dist: numpy>=1.22.4
378
378
  Requires-Dist: Pillow~=11.2.1
379
- Requires-Dist: pybrowsers~=0.8.0
380
379
  Requires-Dist: pyoxipng~=9.1.0
381
- Requires-Dist: python-telegram-bot~=22.0
380
+ Requires-Dist: python-telegram-bot~=22.1
382
381
  Requires-Dist: psutil~=7.0.0
383
382
  Requires-Dist: PyMemoryEditor~=1.5.22
384
383
  Requires-Dist: requests~=2.32.3
385
384
  Requires-Dist: rlottie_python~=1.3.7
386
385
  Requires-Dist: signalstickers-client-fork-laggykiller~=3.3.0.post2
387
386
  Requires-Dist: socksio~=1.0.0
388
- Requires-Dist: telethon~=1.39.0
387
+ Requires-Dist: telethon~=1.40.0
389
388
  Requires-Dist: tqdm~=4.67.1
390
389
  Requires-Dist: ttkbootstrap-fork-laggykiller~=1.5.1
391
390
  Requires-Dist: websocket_client~=1.8.0
@@ -402,7 +401,7 @@ Dynamic: license-file
402
401
 
403
402
  ## Downloads
404
403
  - [Pre-compiled releases](https://github.com/laggykiller/sticker-convert/releases) for Windows, MacOS and Linux (As AppImage).
405
- - Windows: Unzip the downloaded file and run `sticker-convert.exe`
404
+ - Windows: Unzip the downloaded file and run `sticker-convert.exe`, or download msi file for installation
406
405
  - MacOS: Unzip the downloaded file, hold control and open `hold_control_and_click_open_me.command` for the first time, then `sticker-convert.app` in the future
407
406
  - Linux:
408
407
  - AppImage: `chmod +x` the downloaded AppImage and run it
@@ -686,7 +685,6 @@ Credentials options:
686
685
  --kakao-get-auth Generate Kakao auth_token by simulating login. Kakao username, password, country code and phone number are also required.
687
686
  --kakao-get-auth-desktop
688
687
  Get Kakao auth_token from Kakao Desktop application.
689
- (Only working on Windows.)
690
688
  --kakao-bin-path KAKAO_BIN_PATH
691
689
  Set Kakao Desktop application path for launching and getting auth_token.
692
690
  Useful for portable installation.
@@ -889,8 +887,10 @@ See [docs/TODO.md](docs/TODO.md)
889
887
  - Information about Line stickers: https://github.com/doubleplusc/Line-sticker-downloader
890
888
  - Information about Kakao animated stickers: https://gist.github.com/chitacan/9802668
891
889
  - Downloading and decrypting Kakao animated stickers: https://github.com/blluv/KakaoTalkEmoticonDownloader
890
+ - Finding browser executable paths: https://github.com/roniemartinez/browsers
892
891
  - Application icon taken from [Icons8](https://icons8.com/)
893
892
  - Banner generated from [GitHub Socialify](https://socialify.git.ci/)
893
+ - Free code signing on Windows provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/)
894
894
 
895
895
  ## DISCLAIMER
896
896
  - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Naver Band, Viber, Discord, iMessage or Sticker Maker.
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Downloads
11
11
  - [Pre-compiled releases](https://github.com/laggykiller/sticker-convert/releases) for Windows, MacOS and Linux (As AppImage).
12
- - Windows: Unzip the downloaded file and run `sticker-convert.exe`
12
+ - Windows: Unzip the downloaded file and run `sticker-convert.exe`, or download msi file for installation
13
13
  - MacOS: Unzip the downloaded file, hold control and open `hold_control_and_click_open_me.command` for the first time, then `sticker-convert.app` in the future
14
14
  - Linux:
15
15
  - AppImage: `chmod +x` the downloaded AppImage and run it
@@ -293,7 +293,6 @@ Credentials options:
293
293
  --kakao-get-auth Generate Kakao auth_token by simulating login. Kakao username, password, country code and phone number are also required.
294
294
  --kakao-get-auth-desktop
295
295
  Get Kakao auth_token from Kakao Desktop application.
296
- (Only working on Windows.)
297
296
  --kakao-bin-path KAKAO_BIN_PATH
298
297
  Set Kakao Desktop application path for launching and getting auth_token.
299
298
  Useful for portable installation.
@@ -496,8 +495,10 @@ See [docs/TODO.md](docs/TODO.md)
496
495
  - Information about Line stickers: https://github.com/doubleplusc/Line-sticker-downloader
497
496
  - Information about Kakao animated stickers: https://gist.github.com/chitacan/9802668
498
497
  - Downloading and decrypting Kakao animated stickers: https://github.com/blluv/KakaoTalkEmoticonDownloader
498
+ - Finding browser executable paths: https://github.com/roniemartinez/browsers
499
499
  - Application icon taken from [Icons8](https://icons8.com/)
500
500
  - Banner generated from [GitHub Socialify](https://socialify.git.ci/)
501
+ - Free code signing on Windows provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/)
501
502
 
502
503
  ## DISCLAIMER
503
504
  - The author of this repo is NOT affiliated with Signal, Telegram, WhatsApp, Line, Kakao, Naver Band, Viber, Discord, iMessage or Sticker Maker.
@@ -2,7 +2,7 @@ aiolimiter~=1.2.1
2
2
  anyio~=4.9.0
3
3
  apngasm_python~=1.3.2
4
4
  av>=13.1.0
5
- beautifulsoup4~=4.13.3
5
+ beautifulsoup4~=4.13.4
6
6
  cryptg~=0.5.0.post0
7
7
  rookiepy~=0.5.6
8
8
  httpx~=0.28.1
@@ -11,16 +11,15 @@ memory-tempfile~=2.2.3
11
11
  mergedeep~=1.3.4
12
12
  numpy>=1.22.4
13
13
  Pillow~=11.2.1
14
- pybrowsers~=0.8.0
15
14
  pyoxipng~=9.1.0
16
- python-telegram-bot~=22.0
15
+ python-telegram-bot~=22.1
17
16
  psutil~=7.0.0
18
17
  PyMemoryEditor~=1.5.22
19
18
  requests~=2.32.3
20
19
  rlottie_python~=1.3.7
21
20
  signalstickers-client-fork-laggykiller~=3.3.0.post2
22
21
  socksio~=1.0.0
23
- telethon~=1.39.0
22
+ telethon~=1.40.0
24
23
  tqdm~=4.67.1
25
24
  ttkbootstrap-fork-laggykiller~=1.5.1
26
25
  websocket_client~=1.8.0
@@ -551,6 +551,8 @@ class CLI:
551
551
  opt_cred.telethon_api_hash = telethon_api_hash
552
552
 
553
553
  self.cb.msg("Telethon setup successful")
554
+ else:
555
+ self.cb.msg("Telethon setup failed")
554
556
 
555
557
  if args.line_get_auth:
556
558
  get_line_auth = GetLineAuth()
@@ -441,7 +441,7 @@ class StickerConvert:
441
441
  if self.opt_comp.chromium_path:
442
442
  chrome_path = self.opt_comp.chromium_path
443
443
  else:
444
- chrome_path = CRD.get_chrome_path()
444
+ chrome_path = CRD.get_chromium_path()
445
445
  args = [
446
446
  "--headless",
447
447
  "--kiosk",
@@ -77,7 +77,7 @@ class MetadataLine:
77
77
  @staticmethod
78
78
  def get_metadata_sticon(
79
79
  pack_id: str, region: str
80
- ) -> Optional[Tuple[str, str, List[Dict[str, Any]], str, bool]]:
80
+ ) -> Optional[Tuple[str, str, List[Dict[str, Any]], str, bool, bool]]:
81
81
  pack_meta_r = requests.get(
82
82
  f"https://stickershop.line-scdn.net/sticonshop/v1/{pack_id}/sticon/iphone/meta.json"
83
83
  )
@@ -114,14 +114,15 @@ class MetadataLine:
114
114
  files = pack_meta["orders"]
115
115
 
116
116
  resource_type = pack_meta.get("sticonResourceType")
117
+ has_animation = True if resource_type == "ANIMATION" else False
117
118
  has_sound = False
118
119
 
119
- return title, author, files, resource_type, has_sound
120
+ return title, author, files, resource_type, has_animation, has_sound
120
121
 
121
122
  @staticmethod
122
123
  def get_metadata_stickers(
123
124
  pack_id: str, region: str
124
- ) -> Optional[Tuple[str, str, List[Dict[str, Any]], str, bool]]:
125
+ ) -> Optional[Tuple[str, str, List[Dict[str, Any]], str, bool, bool]]:
125
126
  pack_meta_r = requests.get(
126
127
  f"https://stickershop.line-scdn.net/stickershop/v1/product/{pack_id}/android/productInfo.meta"
127
128
  )
@@ -153,9 +154,10 @@ class MetadataLine:
153
154
  files = pack_meta["stickers"]
154
155
 
155
156
  resource_type = pack_meta.get("stickerResourceType")
157
+ has_animation = pack_meta.get("hasAnimation")
156
158
  has_sound = pack_meta.get("hasSound")
157
159
 
158
- return title, author, files, resource_type, has_sound
160
+ return title, author, files, resource_type, has_animation, has_sound
159
161
 
160
162
 
161
163
  class DownloadLine(DownloadBase):
@@ -207,6 +209,7 @@ class DownloadLine(DownloadBase):
207
209
  if (
208
210
  self.resource_type in ("ANIMATION", "ANIMATION_SOUND", "POPUP")
209
211
  or self.has_sound is True
212
+ or self.has_animation is True
210
213
  ):
211
214
  pack_url = f"https://stickershop.line-scdn.net/stickershop/v1/product/{self.pack_id}/iphone/stickerpack@2x.zip"
212
215
  elif self.resource_type == "PER_STICKER_TEXT":
@@ -419,6 +422,7 @@ class DownloadLine(DownloadBase):
419
422
  self.author,
420
423
  self.pack_files,
421
424
  self.resource_type,
425
+ self.has_animation,
422
426
  self.has_sound,
423
427
  ) = metadata
424
428
  else:
@@ -609,7 +609,7 @@ class AdvancedCompressionWindow(BaseWindow):
609
609
  )[1]
610
610
  if color:
611
611
  self.gui.bg_color_var.set(color.replace("#", "") + "00")
612
- self.lift()
612
+ self.lift() # type: ignore
613
613
  self.attributes("-topmost", True) # type: ignore
614
614
  self.attributes("-topmost", False) # type: ignore
615
615
 
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ import platform
2
3
  from functools import partial
3
4
  from threading import Thread
4
5
  from typing import Any, Optional
@@ -51,6 +52,20 @@ class KakaoGetAuthWindow(BaseWindow):
51
52
  justify="left",
52
53
  anchor="w",
53
54
  )
55
+ if platform.system() != "Darwin":
56
+ self.explanation1_4_lbl = Label(
57
+ self.frame_from_desktop,
58
+ text="Note: This will download ProcDump and read memory of KakaoTalk Desktop",
59
+ justify="left",
60
+ anchor="w",
61
+ )
62
+ else:
63
+ self.explanation1_4_lbl = Label(
64
+ self.frame_from_desktop,
65
+ text="Note: This will read memory of KakaoTalk Desktop",
66
+ justify="left",
67
+ anchor="w",
68
+ )
54
69
  self.kakao_bin_path_lbl = Label(
55
70
  self.frame_from_desktop,
56
71
  text="Kakao app path (Optional):",
@@ -85,10 +100,13 @@ class KakaoGetAuthWindow(BaseWindow):
85
100
  self.explanation1_3_lbl.grid(
86
101
  column=0, row=2, columnspan=2, sticky="w", padx=3, pady=3
87
102
  )
88
- self.kakao_bin_path_lbl.grid(column=0, row=3, sticky="w", padx=3, pady=3)
89
- self.kakao_bin_path_entry.grid(column=1, row=3, sticky="w", padx=3, pady=3)
90
- self.launch_desktop_btn.grid(column=0, row=4, columnspan=2, padx=3, pady=3)
91
- self.get_auth_desktop_btn.grid(column=0, row=5, columnspan=2, padx=3, pady=3)
103
+ self.explanation1_4_lbl.grid(
104
+ column=0, row=3, columnspan=2, sticky="w", padx=3, pady=3
105
+ )
106
+ self.kakao_bin_path_lbl.grid(column=0, row=4, sticky="w", padx=3, pady=3)
107
+ self.kakao_bin_path_entry.grid(column=1, row=4, sticky="w", padx=3, pady=3)
108
+ self.launch_desktop_btn.grid(column=0, row=5, columnspan=2, padx=3, pady=3)
109
+ self.get_auth_desktop_btn.grid(column=0, row=6, columnspan=2, padx=3, pady=3)
92
110
 
93
111
  # Method 2 frame
94
112
  self.explanation2_1_lbl = Label(
@@ -277,6 +295,8 @@ class KakaoGetAuthWindow(BaseWindow):
277
295
 
278
296
  def cb_from_desktop_thread(self, *_: Any) -> None:
279
297
  self.gui.save_creds()
298
+ self.gui.cb_msg("Getting auth_token, this may take a minute...")
299
+ self.gui.cb_bar("indeterminate")
280
300
  m = GetKakaoDesktopAuth(
281
301
  cb_ask_str=self.cb_ask_str_kakao,
282
302
  )
@@ -298,3 +318,4 @@ class KakaoGetAuthWindow(BaseWindow):
298
318
  self.gui.highlight_fields()
299
319
 
300
320
  self.cb_msg_block_kakao(msg)
321
+ self.gui.cb_bar("clear")
@@ -59,10 +59,25 @@ class ViberGetAuthWindow(BaseWindow):
59
59
  justify="left",
60
60
  anchor="w",
61
61
  )
62
+ if platform.system() != "Darwin":
63
+ self.explanation_lbl3 = Label(
64
+ self.frame_info,
65
+ text="Note: This will download ProcDump and read memory of Viber Desktop",
66
+ justify="left",
67
+ anchor="w",
68
+ )
69
+ else:
70
+ self.explanation_lbl3 = Label(
71
+ self.frame_info,
72
+ text="Note: This will read memory of Viber Desktop",
73
+ justify="left",
74
+ anchor="w",
75
+ )
62
76
 
63
77
  self.explanation_lbl0.grid(column=0, row=0, sticky="w", padx=3, pady=3)
64
78
  self.explanation_lbl1.grid(column=0, row=1, sticky="w", padx=3, pady=3)
65
79
  self.explanation_lbl2.grid(column=0, row=2, sticky="w", padx=3, pady=3)
80
+ self.explanation_lbl3.grid(column=0, row=3, sticky="w", padx=3, pady=3)
66
81
 
67
82
  # Start button frame
68
83
  self.launch_btn = Button(
@@ -64,7 +64,7 @@
64
64
  "telethon_setup": "Setup Telethon",
65
65
  "kakao_auth_token": "Set Kakao auth_token. Required for downloading animated stickers from https://e.kakao.com/t/xxxxx",
66
66
  "kakao_get_auth": "Generate Kakao auth_token by simulating login. Kakao username, password, country code and phone number are also required.",
67
- "kakao_get_auth_desktop": "Get Kakao auth_token from Kakao Desktop application.\n(Only working on Windows.)",
67
+ "kakao_get_auth_desktop": "Get Kakao auth_token from Kakao Desktop application.",
68
68
  "kakao_bin_path": "Set Kakao Desktop application path for launching and getting auth_token.\nUseful for portable installation.",
69
69
  "kakao_username": "Set Kakao username, which is email or phone number used for signing up Kakao account\nExample: +447700900142\nRequired for generating Kakao auth_token.",
70
70
  "kakao_password": "Set Kakao password (Password of Kakao account).\nRequired for generating Kakao auth_token.",
@@ -72,7 +72,7 @@ class GetDiscordAuth:
72
72
  if chrome_path is not None:
73
73
  using_discord_app = True
74
74
  else:
75
- chrome_path = CRD.get_chrome_path()
75
+ chrome_path = CRD.get_chromium_path()
76
76
  if chrome_path is None:
77
77
  return (
78
78
  None,
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env python3
2
- import importlib.util
3
2
  import os
4
3
  import platform
5
4
  import re
@@ -8,9 +7,9 @@ import time
8
7
  from functools import partial
9
8
  from getpass import getpass
10
9
  from pathlib import Path
11
- from typing import Callable, List, Optional, Tuple, cast
10
+ from typing import Callable, Optional, Tuple, Union, cast
12
11
 
13
- from sticker_convert.utils.process import check_admin, find_pid_by_name, get_mem, killall
12
+ from sticker_convert.utils.process import find_pid_by_name, get_mem, killall
14
13
 
15
14
  MSG_NO_BIN = """Kakao Desktop not detected.
16
15
  Download and install Kakao Desktop,
@@ -97,13 +96,20 @@ class GetKakaoDesktopAuth:
97
96
  self, kakao_bin_path: str, relaunch: bool = True
98
97
  ) -> Tuple[Optional[str], str]:
99
98
  auth_token = None
100
-
101
- if relaunch:
102
- kakao_pid = self.relaunch_kakao(kakao_bin_path)
99
+ kakao_pid: Union[str, int, None]
100
+ if platform.system() == "Windows":
101
+ is_wine = False
102
+ if relaunch:
103
+ kakao_pid = self.relaunch_kakao(kakao_bin_path)
104
+ else:
105
+ kakao_pid = find_pid_by_name("kakaotalk")
106
+ if kakao_pid is None:
107
+ return None, MSG_LAUNCH_FAIL
103
108
  else:
104
- kakao_pid = find_pid_by_name("kakaotalk")
105
- if kakao_pid is None:
106
- return None, MSG_LAUNCH_FAIL
109
+ is_wine = True
110
+ kakao_pid = "KakaoTalk.exe"
111
+ if relaunch and self.relaunch_kakao(kakao_bin_path) is None:
112
+ return None, MSG_LAUNCH_FAIL
107
113
 
108
114
  if self.cb_ask_str == input:
109
115
  pw_func = getpass
@@ -111,10 +117,10 @@ class GetKakaoDesktopAuth:
111
117
  pw_func = partial(
112
118
  self.cb_ask_str, initialvalue="", cli_show_initialvalue=False
113
119
  )
114
- s, msg = get_mem(kakao_pid, pw_func)
120
+ s = get_mem(kakao_pid, pw_func, is_wine)
115
121
 
116
122
  if s is None:
117
- return None, msg
123
+ return None, "Failed to dump memory"
118
124
 
119
125
  auth_token = None
120
126
  for i in re.finditer(b"authorization: ", s):
@@ -140,6 +146,13 @@ class GetKakaoDesktopAuth:
140
146
  return auth_token, msg
141
147
 
142
148
  def get_auth_darwin(self, kakao_bin_path: str) -> Tuple[Optional[str], str]:
149
+ csrutil_status = subprocess.run(
150
+ ["csrutil", "status"], capture_output=True, text=True
151
+ ).stdout
152
+
153
+ if "enabled" in csrutil_status:
154
+ return None, MSG_SIP_ENABLED
155
+
143
156
  killall("kakaotalk")
144
157
 
145
158
  subprocess.run(
@@ -205,9 +218,10 @@ class GetKakaoDesktopAuth:
205
218
  elif platform.system() == "Darwin":
206
219
  kakao_bin_path = "/Applications/KakaoTalk.app"
207
220
  else:
208
- kakao_bin_path = os.path.expanduser(
209
- "~/.wine/drive_c/Program Files (x86)/Kakao/KakaoTalk/KakaoTalk.exe"
210
- )
221
+ wineprefix = os.environ.get("WINEPREFIX")
222
+ if not (wineprefix and Path(wineprefix).exists()):
223
+ wineprefix = os.path.expanduser("~/.wine")
224
+ kakao_bin_path = f"{wineprefix}/drive_c/Program Files (x86)/Kakao/KakaoTalk/KakaoTalk.exe"
211
225
 
212
226
  if Path(kakao_bin_path).exists():
213
227
  return kakao_bin_path
@@ -220,7 +234,7 @@ class GetKakaoDesktopAuth:
220
234
  ) -> Tuple[Optional[str], str]:
221
235
  # get_auth_by_dump()
222
236
  # + Fast
223
- # - Requires admin
237
+ # - Requires downloading procdump, or builtin method that needs admin
224
238
 
225
239
  # get_auth_by_pme()
226
240
  # + No admin (If have permission to read process)
@@ -233,32 +247,13 @@ class GetKakaoDesktopAuth:
233
247
  if not kakao_bin_path:
234
248
  return None, MSG_NO_BIN
235
249
 
236
- if platform.system() != "Darwin":
237
- # If admin, prefer get_auth_by_dump() over get_auth_by_pme(), vice versa
238
- methods: List[Callable[[str, bool], Tuple[Optional[str], str]]] = []
239
- relaunch = True
240
- kakao_auth = None
241
- msg = ""
242
-
243
- pme_present = importlib.util.find_spec("PyMemoryEditor") is not None
244
- methods.append(self.get_auth_by_dump)
245
- if pme_present:
246
- methods.append(self.get_auth_by_pme)
247
- if check_admin() is False:
248
- methods.reverse()
249
-
250
- for method in methods:
251
- kakao_auth, msg = method(kakao_bin_path, relaunch)
252
- relaunch = False
253
- if kakao_auth is not None:
254
- break
255
- else:
256
- csrutil_status = subprocess.run(
257
- ["csrutil", "status"], capture_output=True, text=True
258
- ).stdout
259
-
260
- if "enabled" in csrutil_status:
261
- return None, MSG_SIP_ENABLED
250
+ if platform.system() == "Windows":
251
+ kakao_auth, msg = self.get_auth_by_dump(kakao_bin_path)
252
+ if kakao_auth is None:
253
+ kakao_auth, msg = self.get_auth_by_pme(kakao_bin_path, False)
254
+ elif platform.system() == "Darwin":
262
255
  kakao_auth, msg = self.get_auth_darwin(kakao_bin_path)
256
+ else:
257
+ kakao_auth, msg = self.get_auth_by_dump(kakao_bin_path)
263
258
 
264
259
  return kakao_auth, msg
@@ -130,10 +130,10 @@ class GetViberAuth:
130
130
  pw_func = partial(
131
131
  self.cb_ask_str, initialvalue="", cli_show_initialvalue=False
132
132
  )
133
- s, msg = get_mem(viber_pid, pw_func)
133
+ s = get_mem(viber_pid, pw_func)
134
134
 
135
135
  if s is None:
136
- return None, msg
136
+ return None, "Failed to dump memory"
137
137
 
138
138
  member_id_addr = s.find(b"X-Viber-Auth-Mid: ")
139
139
  m_token_addr = s.find(b"X-Viber-Auth-Token: ")
@@ -217,8 +217,6 @@ class GetViberAuth:
217
217
  methods.append(self.get_auth_by_dump)
218
218
  if pme_present:
219
219
  methods.append(self.get_auth_by_pme)
220
- if check_admin() is False:
221
- methods.reverse()
222
220
  else:
223
221
  if not os.path.isfile("/.dockerenv"):
224
222
  methods.append(self.get_auth_by_dump)
@@ -342,10 +342,12 @@ class TelethonAPI(TelegramAPI):
342
342
  self.cb = cb
343
343
  self.cb_return = cb_return
344
344
 
345
- success, self.client, _, _ = await TelethonSetup(
345
+ success, client, _, _ = await TelethonSetup(
346
346
  self.opt_cred, self.cb_ask_str
347
347
  ).start_async()
348
348
 
349
+ if success is True and client is not None:
350
+ self.client = client
349
351
  return success
350
352
 
351
353
  async def exit(self) -> None:
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python3
2
- from typing import Callable, Tuple
2
+ from typing import Callable, Optional, Tuple
3
3
 
4
4
  import anyio
5
5
  from telethon import TelegramClient # type: ignore
@@ -58,28 +58,39 @@ class TelethonSetup:
58
58
  def guide(self) -> None:
59
59
  self.cb_ask_str(GUIDE_MSG)
60
60
 
61
- def get_api_info(self) -> None:
61
+ def get_api_info(self) -> bool:
62
62
  api_id_ask = "Enter api_id: "
63
63
  wrong_hint = ""
64
+
64
65
  while True:
65
66
  telethon_api_id = self.cb_ask_str(wrong_hint + api_id_ask)
66
- if telethon_api_id.isnumeric():
67
+ if telethon_api_id == "":
68
+ return False
69
+ elif telethon_api_id.isnumeric():
67
70
  self.opt_cred.telethon_api_id = int(telethon_api_id)
68
71
  break
69
72
  else:
70
73
  wrong_hint = "Error: api_id should be numeric\n"
74
+
71
75
  self.opt_cred.telethon_api_hash = self.cb_ask_str("Enter api_hash: ")
76
+ if self.opt_cred.telethon_api_hash == "":
77
+ return False
78
+ return True
72
79
 
73
80
  def signin(self) -> Tuple[bool, TelegramClient, int, str]:
74
81
  return anyio.run(self.signin_async)
75
82
 
76
- def start(self) -> Tuple[bool, TelegramClient, int, str]:
83
+ def start(self) -> Tuple[bool, Optional[TelegramClient], int, str]:
84
+ cred_valid = False
77
85
  if self.opt_cred.telethon_api_id == 0 or self.opt_cred.telethon_api_hash == "":
78
86
  self.guide()
79
- self.get_api_info()
80
- return self.signin()
87
+ cred_valid = self.get_api_info()
88
+ if cred_valid:
89
+ return self.signin()
90
+ else:
91
+ return False, None, 0, ""
81
92
 
82
- async def start_async(self) -> Tuple[bool, TelegramClient, int, str]:
93
+ async def start_async(self) -> Tuple[bool, Optional[TelegramClient], int, str]:
83
94
  if self.opt_cred.telethon_api_id == 0 or self.opt_cred.telethon_api_hash == "":
84
95
  self.guide()
85
96
  self.get_api_info()
@@ -9,7 +9,7 @@ import signal
9
9
  import socket
10
10
  import subprocess
11
11
  import time
12
- from typing import Any, Dict, List, Optional, Tuple, Union, cast
12
+ from typing import Any, Dict, List, Optional, Union, cast
13
13
 
14
14
  import requests
15
15
  import websocket
@@ -83,28 +83,14 @@ class CRD:
83
83
  self.chrome_proc = subprocess.Popen(launch_cmd)
84
84
 
85
85
  @staticmethod
86
- def get_chrome_path() -> Optional[str]:
87
- import logging
88
-
89
- import browsers # type: ignore
90
-
91
- # browsers module would turn on info logging
92
- logger = logging.getLogger()
93
- logger.setLevel(logging.CRITICAL)
94
-
95
- bs: List[Tuple[int, str]] = []
96
- for b in browsers.browsers():
97
- browser_type = b["browser_type"]
98
- path = b["path"]
99
- try:
100
- rank = BROWSER_PREF.index(browser_type)
101
- except ValueError:
102
- continue
103
- bs.append((rank, path))
104
- if len(bs) == 0:
105
- return None
106
- bs = sorted(bs, key=lambda x: x[0])
107
- return bs[0][1]
86
+ def get_chromium_path() -> Optional[str]:
87
+ if platform.system() == "Windows":
88
+ from sticker_convert.utils.chromiums.windows import get_chromium_path
89
+ elif platform.system() == "Darwin":
90
+ from sticker_convert.utils.chromiums.osx import get_chromium_path
91
+ else:
92
+ from sticker_convert.utils.chromiums.linux import get_chromium_path
93
+ return get_chromium_path()
108
94
 
109
95
  def connect(self, target_id: int = 0) -> None:
110
96
  self.cmd_id = 1
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env python3
2
+ import configparser
3
+ import os
4
+ import re
5
+ from typing import Optional
6
+
7
+ # Adopted from https://github.com/roniemartinez/browsers/blob/master/browsers/linux.py
8
+
9
+ LINUX_DESKTOP_ENTRY_LIST = (
10
+ ("chrome", ("google-chrome",)),
11
+ ("chromium", ("chromium", "chromium_chromium")),
12
+ ("brave", ("brave-browser", "brave_brave")),
13
+ ("brave-beta", ("brave-browser-beta",)),
14
+ ("brave-nightly", ("brave-browser-nightly",)),
15
+ ("msedge", ("microsoft-edge",)),
16
+ ("opera", ("opera_opera",)),
17
+ ("opera-beta", ("opera-beta_opera-beta",)),
18
+ ("opera-developer", ("opera-developer_opera-developer",)),
19
+ ("vivaldi", ("vivaldi_vivaldi-stable",)),
20
+ )
21
+
22
+ # $XDG_DATA_HOME and $XDG_DATA_DIRS are not always set
23
+ XDG_DATA_LOCATIONS = (
24
+ "~/.local/share/applications",
25
+ "/usr/share/applications",
26
+ "/var/lib/snapd/desktop/applications",
27
+ )
28
+
29
+ VERSION_PATTERN = re.compile(
30
+ r"\b(\S+\.\S+)\b"
31
+ ) # simple pattern assuming all version strings have a dot on them
32
+
33
+
34
+ def get_chromium_path() -> Optional[str]:
35
+ for _, desktop_entries in LINUX_DESKTOP_ENTRY_LIST:
36
+ for application_dir in XDG_DATA_LOCATIONS:
37
+ for desktop_entry in desktop_entries:
38
+ path = os.path.join(application_dir, f"{desktop_entry}.desktop")
39
+
40
+ if not os.path.isfile(path):
41
+ continue
42
+
43
+ config = configparser.ConfigParser(interpolation=None)
44
+ config.read(path, encoding="utf-8")
45
+ executable_path = config.get("Desktop Entry", "Exec")
46
+
47
+ if executable_path.lower().endswith(" %u"):
48
+ executable_path = executable_path[:-3].strip()
49
+
50
+ return executable_path
51
+
52
+ return None