Commit 3ca68ace authored by l2m2's avatar l2m2

upload.

parent f057c675
......@@ -129,4 +129,3 @@ dmypy.json
.pyre/
qrcode.png
\ No newline at end of file
dirty_demo.py
\ No newline at end of file
......@@ -18,6 +18,15 @@ pyinstaller -F --icon=uploader.ico dingding-cookie-uploader.py
pip install --upgrade 'setuptools<45.0.0'
```
- Processes stuck in loop with PyInstaller-executable
```
You need to use multiprocessing.freeze_support() when you produce a Windows executable with PyInstaller.
```
- TypeError: cafile, capath and cadata cannot be all omitted
## Reference
- https://github.com/pypa/setuptools/issues/1963
-
\ No newline at end of file
- https://stackoverflow.com/questions/57517371/matplotlibdeprecationwarning-with-pyinstaller-exe
- https://stackoverflow.com/questions/54065079/processes-stuck-in-loop-with-pyinstaller-executable
\ No newline at end of file
from dingdinghelper import DingDingHelper
import requests
import ctypes
from multiprocessing import Process, freeze_support
def Mbox(title, text, style):
return ctypes.windll.user32.MessageBoxW(0, text, title, style)
if __name__ == "__main__":
def f():
ding = DingDingHelper()
ding.renew_cookie()
r = requests.post("http://139.196.104.13:9181/api/_/dingding/setCookie", json={ "cookie": ding.cookie })
......@@ -13,3 +14,7 @@ if __name__ == "__main__":
Mbox('提示', '上传成功!', 0)
else:
Mbox('提示', '上传失败!', 0)
if __name__ == "__main__":
freeze_support()
Process(target=f).start()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment