Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yastone opened this issue Nov 30, 2024 · 2 comments
Open

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

Yastone opened this issue Nov 30, 2024 · 2 comments

Comments

@Yastone
Copy link

Yastone commented Nov 30, 2024

因为我是用脚本多进程启动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 <lambda>
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 <lambda>
UnicodeEncodeError: 'gbk' codec can't encode character '\u30fb' in position 51: illegal multibyte sequence
@fffonion
Copy link
Owner

配置里写
auto_update="off"
就可以了

第二个问题等我回去看看

@Yastone
Copy link
Author

Yastone commented Nov 30, 2024

感谢回复!

另外还有一个小问题,因为之前我发现某些本子下载完成后会丢页数,所以我一般会下载完成后再下载一遍防止丢页。
这就导致了一个问题,由于新版本一些本子是会在下载完成之后统一把后缀名从jpg改为png,就会导致如果之前这个本子已经下载完成,那么再次下载的话就会从头开始下载,并且完成后就会产生重复的页数。

比如说 https://exhentai.org/g/2684017/4e4b7d1c41/ 就会产生这种情况。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants