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

请问能提供漫画网址转换的功能吗? #79

Open
wby238 opened this issue Oct 26, 2017 · 11 comments
Open

请问能提供漫画网址转换的功能吗? #79

wby238 opened this issue Oct 26, 2017 · 11 comments

Comments

@wby238
Copy link

wby238 commented Oct 26, 2017

以前下载了许多在www.ikanman.com这个网站的漫画,但现在这个网站的网址改为www.manhuagui.com了,www.ikanman.com这个网址已经403了,直接将ikanman替换为manhuagui的话是可以访问的。

@eight04

This comment has been minimized.

@wby238

This comment has been minimized.

@eight04

This comment has been minimized.

@IthildinX

This comment has been minimized.

@eight04

This comment has been minimized.

@IthildinX

This comment has been minimized.

@eight04
Copy link
Owner

eight04 commented Jul 24, 2018

init_episode 的確是沒有在使用,移除也沒影響。修改成如下試試︰

from comiccrawler.mission_manager import mission_manager
from comiccrawler.episode_loader import edit_mission_id

POOL_NAMES = ["view", "library"]
TARGET = "ikanman.com"
REPL = "manhuagui.com"

for mission in list(mission_manager.pool.values()):
	if TARGET not in mission.url:
		continue
		
	old_url = mission.url
	with edit_mission_id(mission):
		mission.url = old_url.replace(TARGET, REPL)
	del mission_manager.pool[old_url]
	mission_manager.pool[mission.url] = mission
	
	for name in POOL_NAMES:
		pool = getattr(mission_manager, name)
		if old_url in pool:
			del pool[old_url]
			pool[mission.url] = mission
			
	print(old_url, mission.url)
	
mission_manager.edit = True
mission_manager.save()

dictionary changed size during iteration 是字典 mission_manager.pool 在迴圈中被修改會跳出的錯誤。換句話說,那份程式碼是完全沒用的……不知道 @wby238 是否有發現。

@starobots
Copy link

eight你好,
我用这个脚本可以替换library.json、view.json。
pool.json和pool文件夹的分章节json没修改。
我替换的内容是www.manhuagui.com到tw.manhuagui.com
不过旧有pool文件夹的分章节json文件好像没用了。
所以我换了一个脚本把pool.json和pool文件夹各章节json替换上述内容之后。
用检查更新图书馆,pool文件夹里会重建一个“所有都没下载过”的分章节json文件。
感觉是不会读取pool文件夹改过的分章节json文件。
这样会使得图书馆中所有下载过的文件全都要重新下载一遍。
请教有没有修改方法,谢谢。

@eight04
Copy link
Owner

eight04 commented Nov 8, 2018

@starobots 哪個腳本?舊的 還是 新的

@starobots
Copy link

下面这个只能改view.json和library.json。pool.json和pool文件夹里面的改不了。
如果我自己改pool.json和pool文件夹,检查更新之后就会全都重新下载。
麻烦您了。

@eight04
Copy link
Owner

eight04 commented Nov 9, 2018

pool.json和pool文件夹的分章节json没修改。

我測試了一下,pool.json 內的任務 URL 有被更新,pool 資料夾內的檔名也有被更新。你使用的 Comic Crawler 是最新版嗎?

换了一个脚本把pool.json和pool文件夹各章节json替换上述内容之后

哪個腳本?

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

4 participants