sticker-convert 2.9.2__py3-none-any.whl → 2.9.3__py3-none-any.whl
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.
- sticker_convert/downloaders/download_kakao.py +3 -47
- sticker_convert/version.py +1 -1
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/METADATA +2 -3
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/RECORD +8 -8
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/LICENSE +0 -0
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/WHEEL +0 -0
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.9.2.dist-info → sticker_convert-2.9.3.dist-info}/top_level.txt +0 -0
@@ -3,20 +3,13 @@ from __future__ import annotations
|
|
3
3
|
|
4
4
|
import itertools
|
5
5
|
import json
|
6
|
-
import webbrowser
|
7
6
|
from pathlib import Path
|
8
|
-
from tempfile import TemporaryDirectory
|
9
7
|
from typing import Any, List, Optional, Tuple, cast
|
10
8
|
from urllib.parse import urlparse
|
11
9
|
|
12
|
-
import chromedriver_autoinstaller # type: ignore
|
13
10
|
import requests
|
14
11
|
from bs4 import BeautifulSoup
|
15
|
-
from
|
16
|
-
from selenium.webdriver.chrome.options import Options
|
17
|
-
from selenium.webdriver.common.by import By
|
18
|
-
from selenium.webdriver.support import expected_conditions as EC
|
19
|
-
from selenium.webdriver.support.wait import WebDriverWait
|
12
|
+
from py_mini_racer import MiniRacer
|
20
13
|
|
21
14
|
from sticker_convert.downloaders.download_base import DownloadBase
|
22
15
|
from sticker_convert.job_option import CredOption
|
@@ -43,17 +36,6 @@ class daumtools {
|
|
43
36
|
}
|
44
37
|
"""
|
45
38
|
|
46
|
-
HTMLPAGE = """
|
47
|
-
<html>
|
48
|
-
<body>
|
49
|
-
<p id="p1"></p>
|
50
|
-
<script>
|
51
|
-
{}
|
52
|
-
</script>
|
53
|
-
</body>
|
54
|
-
</html>
|
55
|
-
"""
|
56
|
-
|
57
39
|
|
58
40
|
class MetadataKakao:
|
59
41
|
@staticmethod
|
@@ -145,36 +127,10 @@ class DownloadKakao(DownloadBase):
|
|
145
127
|
if "daumtools.web2app" not in js:
|
146
128
|
return None, None
|
147
129
|
|
148
|
-
js = js.replace(
|
149
|
-
"daumtools.web2app",
|
150
|
-
'document.getElementById("p1").innerHTML = daumtools.web2app',
|
151
|
-
)
|
152
130
|
js = JSINJECT + js
|
153
131
|
|
154
|
-
|
155
|
-
|
156
|
-
html_page = HTMLPAGE.format(js)
|
157
|
-
with open(html_page_path, "w+") as f:
|
158
|
-
f.write(html_page)
|
159
|
-
|
160
|
-
try:
|
161
|
-
chromedriver_autoinstaller.install()
|
162
|
-
chrome_options = Options()
|
163
|
-
chrome_options.add_argument("--headless") # type: ignore
|
164
|
-
driver = webdriver.Chrome(options=chrome_options)
|
165
|
-
driver.get(html_page_path.as_posix())
|
166
|
-
wait = WebDriverWait(driver, 10)
|
167
|
-
wait.until(EC.text_to_be_present_in_element((By.ID, "p1"), "kakaotalk")) # type: ignore
|
168
|
-
kakao_url_elm = driver.find_element(By.ID, "p1")
|
169
|
-
kakao_url = cast(str, kakao_url_elm.text) # type: ignore
|
170
|
-
driver.close()
|
171
|
-
except ValueError:
|
172
|
-
webbrowser.open(html_page_path.as_posix())
|
173
|
-
prompt = "Chrome not installed, using manual method.\n"
|
174
|
-
prompt += "Please copy and paste the url you see in the browser"
|
175
|
-
self.cb.put(("ask_str", (prompt,), None))
|
176
|
-
kakao_url = cast(str, self.cb_return.get_response())
|
177
|
-
|
132
|
+
ctx = MiniRacer()
|
133
|
+
kakao_url = cast(str, ctx.eval(js))
|
178
134
|
item_code = urlparse(kakao_url).path.split("/")[2]
|
179
135
|
|
180
136
|
return pack_title, item_code
|
sticker_convert/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sticker-convert
|
3
|
-
Version: 2.9.
|
3
|
+
Version: 2.9.3
|
4
4
|
Summary: Convert (animated) stickers to/from WhatsApp, Telegram, Signal, Line, Kakao, Viber, iMessage. Written in Python.
|
5
5
|
Author-email: laggykiller <chaudominic2@gmail.com>
|
6
6
|
Maintainer-email: laggykiller <chaudominic2@gmail.com>
|
@@ -369,11 +369,11 @@ Requires-Dist: anyio ~=4.4.0
|
|
369
369
|
Requires-Dist: apngasm-python ~=1.3.1
|
370
370
|
Requires-Dist: av ~=12.2.0
|
371
371
|
Requires-Dist: beautifulsoup4 ~=4.12.3
|
372
|
-
Requires-Dist: chromedriver-autoinstaller ~=0.6.4
|
373
372
|
Requires-Dist: rookiepy ~=0.5.2
|
374
373
|
Requires-Dist: imagequant ~=1.1.1
|
375
374
|
Requires-Dist: memory-tempfile ~=2.2.3
|
376
375
|
Requires-Dist: mergedeep ~=1.3.4
|
376
|
+
Requires-Dist: mini-racer ~=0.12.4
|
377
377
|
Requires-Dist: numpy >=1.22.4
|
378
378
|
Requires-Dist: Pillow ~=10.4.0
|
379
379
|
Requires-Dist: pyoxipng ~=9.0.0
|
@@ -382,7 +382,6 @@ Requires-Dist: psutil ~=6.0.0
|
|
382
382
|
Requires-Dist: PyMemoryEditor ~=1.5.22
|
383
383
|
Requires-Dist: requests ~=2.32.3
|
384
384
|
Requires-Dist: rlottie-python ~=1.3.6
|
385
|
-
Requires-Dist: selenium ~=4.22.0
|
386
385
|
Requires-Dist: signalstickers-client-fork-laggykiller ~=3.3.0.post2
|
387
386
|
Requires-Dist: sqlcipher3-wheels ~=0.5.2.post1
|
388
387
|
Requires-Dist: tqdm ~=4.66.4
|
@@ -6,10 +6,10 @@ sticker_convert/definitions.py,sha256=ZhP2ALCEud-w9ZZD4c3TDG9eHGPZyaAL7zPUsJAbjt
|
|
6
6
|
sticker_convert/gui.py,sha256=hZOp2SyEYKbCRm9SRTItBqEk724SHtSqK_Txo0wpL8Q,31194
|
7
7
|
sticker_convert/job.py,sha256=4C2WwB3PFldacqI8UPnM10thM087VLEl9wn6P9_LtS0,26128
|
8
8
|
sticker_convert/job_option.py,sha256=yFwHEhW8Gzp9dfiXakkCREfejAIJhiOxwD4Wlg9jcPk,7805
|
9
|
-
sticker_convert/version.py,sha256
|
9
|
+
sticker_convert/version.py,sha256=-3orOmwxQLXzeq93BjsCFkrDamN1_r5Ng80gy5-PF0w,46
|
10
10
|
sticker_convert/downloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
sticker_convert/downloaders/download_base.py,sha256=WGEtri16p6GCG7hhQ603pKS8efoB72oCBHTuJ_RVmG0,4041
|
12
|
-
sticker_convert/downloaders/download_kakao.py,sha256=
|
12
|
+
sticker_convert/downloaders/download_kakao.py,sha256=kE3LikphcFrFjAf-eJhmkj0Ko_JG9QpWFTp_YiWEzRA,11605
|
13
13
|
sticker_convert/downloaders/download_line.py,sha256=9WzOWujTbZdAqBi52k21OUEfRmcV1loCaJiDmg6dklw,17853
|
14
14
|
sticker_convert/downloaders/download_signal.py,sha256=PfwscdbcEd_5C3Ecs0F8Qc8si1sLzLodAdnsHVwXgac,3063
|
15
15
|
sticker_convert/downloaders/download_telegram.py,sha256=jufMqc78aXOPDr7fQf9ykkNyhQ7KVCp4gRBxs09NgMo,4614
|
@@ -98,9 +98,9 @@ sticker_convert/utils/media/apple_png_normalize.py,sha256=LbrQhc7LlYX4I9ek4XJsZE
|
|
98
98
|
sticker_convert/utils/media/codec_info.py,sha256=1QfW3wgZ5vOk7T4XtLHYvJK1x8RbASRPSvhKEPkcu9A,15747
|
99
99
|
sticker_convert/utils/media/decrypt_kakao.py,sha256=4wq9ZDRnFkx1WmFZnyEogBofiLGsWQM_X69HlA36578,1947
|
100
100
|
sticker_convert/utils/media/format_verify.py,sha256=MH68GLJfXeL8WFT8emtj355K5BLAtUX64tQ59nugx2c,5673
|
101
|
-
sticker_convert-2.9.
|
102
|
-
sticker_convert-2.9.
|
103
|
-
sticker_convert-2.9.
|
104
|
-
sticker_convert-2.9.
|
105
|
-
sticker_convert-2.9.
|
106
|
-
sticker_convert-2.9.
|
101
|
+
sticker_convert-2.9.3.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
102
|
+
sticker_convert-2.9.3.dist-info/METADATA,sha256=AhL6yrezU5-qhw5E2euXRDGz9fRplznnme-gVs4O0bo,51023
|
103
|
+
sticker_convert-2.9.3.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
104
|
+
sticker_convert-2.9.3.dist-info/entry_points.txt,sha256=MNJ7XyC--ugxi5jS1nzjDLGnxCyLuaGdsVLnJhDHCqs,66
|
105
|
+
sticker_convert-2.9.3.dist-info/top_level.txt,sha256=r9vfnB0l1ZnH5pTH5RvkobnK3Ow9m0RsncaOMAtiAtk,16
|
106
|
+
sticker_convert-2.9.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|