Files
j-novel-scrapper-translator/main.py
T
2026-02-09 19:46:13 +01:00

37 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import random
from src.EpubHandler import EpubHandler
from src.Translator import Translator
from src.WebScrapper import WebScrapper
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
# scrapper = WebScrapper("https://www.fanmtl.com/novel/", r"E:\temp\WN\Game of the World Tree\HTML", "en")
# scrapper.getHtml("game-of-the-world-tree_{}.html", 1, 987)
# epubHandler = EpubHandler(r"E:\temp\WN\Game of the World Tree\HTML", r"E:\temp\WN\Game of the World Tree\epub")
# epubHandler.convertHtmlToEpub("en", r"C:\Users\JohannesBOZZ\Downloads\01605-game-of-the-world-tree.jpg")
#scrapper = WebScrapper("https://ncode.syosetu.com/n0806fu/", r"E:\temp\WN\Golden Experience\HTML", "jp")
#scrapper.getHtml("{}/", 334, 620) # 612
# scrapper = WebScrapper("https://fenrirealm.com/series/dorothys-forbidden-grimoire/", r"E:\temp\WN\Dorothys Forbidden Grimoire\HTML", "en")
# scrapper.getHtml("{}", 377, 828, 2)
epubHandler = EpubHandler(r"E:\temp\WN\Dorothys Forbidden Grimoire\HTML", r"E:\temp\WN\Dorothys Forbidden Grimoire\EPUB")
epubHandler.convertHtmlToEpub("en", r"C:\Users\JohannesBOZZ\Downloads\6e1de333d6af7aaa3fdf3ffa66ac6f55.png")
# epubHandler = EpubHandler(r"E:\temp\WN\Golden Experience\501-609", r"E:\temp\WN\Golden Experience\epub")
# epubHandler = EpubHandler(r"C:\Users\JohannesBOZZ\Downloads\黄金の経験値 VI 特定災害生物「魔王」暗躍マグナメルム\html", r"C:\Users\JohannesBOZZ\Downloads\黄金の経験値 VI 特定災害生物「魔王」暗躍マグナメルム")
# epubHandler.epub_to_html(r"C:\Users\JohannesBOZZ\Downloads\黄金の経験値 VI 特定災害生物「魔王」暗躍マグナメルム\黄金の経験値 VI 特定災害生物「魔王」暗躍マグナメルム.epub")
# epubHandler = EpubHandler(r"W:\Temp\html", r"W:\Temp\epub")
#epubHandler.convertHtmlToEpub("jp")
# translator = Translator(r"facebook/nllb-200-3.3B", r"W:\Temp\html", r"W:\Temp\translate test")
# translator.doTranslate()