fffonion / fffonion/xeHentai

关于自动更新的问题以及特殊字符的问题

Open
#106 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
804
Forks
89
PR merge metrics
No merged PRs in 30d

Description

因为我是用脚本多进程启动xehentai下载的,所以可能会同时开很多主程序,导致频繁访问更新,之后就会报错。可否增加一个参数禁用自动更新?

另外我用脚本调用2.0.2.3版本的程序下载任务的时候,遇到一些有特殊字符的标题,程序就会报错然后所有的绅士全部都会挂掉。使用的操作系统是Windows,编辑器是Pycharm。系统语言改成英文就可以解决问题,或者交互模式下载也没问题。

以下是可以复现错误的python脚本代码,编辑器是Pycharm:
```
import os

if __name__ == '__main__':
cmd = "G:/xehentai/xeHentai-2.0.2.3.exe -o -d G:/xehentai_download https://exhentai.org/g/2670758/e54972568b/"
os.system(cmd)
```

下面是报错:
```
xception in thread main:
Traceback (most recent call last):
File "G:\xehentai\src.zip\xeHentai\util\logger.py", line 106, in log
File "G:\xehentai\src.zip\xeHentai\util\logger.py", line 53, in
UnicodeEncodeError: 'gbk' codec can't encode character '\u30fb' in position 51: illegal multibyte sequence

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "threading.py", line 1045, in _bootstrap_inner
File "threading.py", line 982, in run
File "G:\xehentai\src.zip\xeHentai\core.py", line 357, in _task_loop
File "G:\xehentai\src.zip\xeHentai\core.py", line 265, in _do_task
File "G:\xehentai\src.zip\xeHentai\util\logger.py", line 126, in info
File "G:\xehentai\src.zip\xeHentai\util\logger.py", line 109, in log
File "G:\xehentai\src.zip\xeHentai\util\logger.py", line 53, in
UnicodeEncodeError: 'gbk' codec can't encode character '\u30fb' in position 51: illegal multibyte sequence
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.