ComicRead

Add enhanced features to the comic site for optimized experience, including dual-page reading and translation. E-Hentai (Associate nhentai, Quick favorite, Colorize tags, Detect advertise page, etc.) | nhentai (Totally block comics, Auto page turning) | hitomi | Anchira | kemono | nekohouse | welovemanga.

< Feedback on ComicRead

Review: Good - script works

§
Posted: 2023-11-20

请求增加ksk新站点
https://anchira.to/

hymbzAuthor
§
Posted: 2023-11-21

没法支持。。。网页图片全放到了关闭的 shadow DOM 里,直接断了前端的路。后端 API 则做了加密处理,在其他人找到解密手段并开源之前,我是无能为力了。

§
Posted: 2024-01-31
let get = async () => {
    let urlArr = window.location.href.split("/");
    let galleryId = urlArr.at(-2);
    let galleryKey = urlArr.at(-1);
    let res = await fetch(`/api/v1/library/${galleryId}/${galleryKey}/data`, {
        "headers": {
            "x-requested-with": "XMLHttpRequest"
        }
    });
    if (res.status != 200) {
        console.log("觸發人機驗證");
    } else {
        let bSrc = document.querySelector("#gallery img").src;
        let imgOrigin = new URL(bSrc).origin;
        let json = await res.json();
        let gallerHash = json.hash;
        let gallerReadKey = json.key;
        let imgSrcs = json.names.map(name => imgOrigin + "/" + galleryId + "/" + gallerReadKey + "/" + gallerHash + "/b/" + name);
        console.log(imgSrcs);
    }
}
get();

需要在畫廊詳情頁使用

hymbzAuthor
§
Posted: 2024-01-31

@tony0809 非常感谢!不过问下 imgOrigin 一定要现场获取吗?我看 tachiyomi 是直接写死的

§
Posted: 2024-01-31

@tony0809 非常感谢!不过问下 imgOrigin 一定要现场获取吗?我看 tachiyomi 是直接写死的

今天没事试了一下,看了控制台发现Read暴露了原始链结,比对了下缩略图和API,然后就成功取得了。
我也不确定imgOrigin会不会全部都是https://kisakisexo.xyz/,是的话就能直接写死。

hymbzAuthor
§
Posted: 2024-01-31

今天没事试了一下,看了控制台发现Read暴露了原始链结,比对了下缩略图和API,然后就成功取得了。我也不确定imgOrigin会不会全部都是https://kisakisexo.xyz/,是的话就能直接写死。

原来如此,那我就先写死好了,不然还要等元素渲染出来。

hymbzAuthor
§
Posted: 2024-02-01

已更新支持

§
Posted: 2024-07-21

這網站改版了

https://koharu.to/

const get = () => {
    const [, , g_id, g_key] = location.pathname.split("/");
    const detailApi = `https://api.koharu.to/books/detail/${g_id}/${g_key}`;
    fetch(detailApi).then(res => res.json()).then(detailJson => {
        console.log("\ndetailJson\n", detailJson);
        const {
            created_at,
            updated_at,
            data,
            thumbnails
        } = detailJson;
        const {
            base,
            entries
        } = thumbnails;
        const thumbs = entries.map(e => base + e.path);
        console.log("\nthumbs\n", thumbs);
        const [maxSize] = Object.values(data).sort((a, b) => b.size - a.size);
        console.log("\nmaxSize\n", maxSize);
        const {
            id,
            public_key
        } = maxSize;
        const dataApi = `https://api.koharu.to/books/data/${g_id}/${g_key}/${id}/${public_key}?v=${updated_at ?? created_at}`;
        fetch(dataApi).then(res => res.json()).then(dataJson => {
            const {
                base,
                entries
            } = dataJson;
            console.log("\ndataJson\n", dataJson);
            const srcs = entries.map(async (e, i, arr) => {
                await new Promise(resolve => setTimeout(resolve, i * 500));
                return new Promise(async resolve => {
                    const xhr = new XMLHttpRequest;
                    xhr.responseType = "blob";
                    xhr.open("GET", base + e.path);
                    xhr.onload = () => {
                        resolve(URL.createObjectURL(xhr.response));
                    };
                    xhr.send();
                });
            });
            Promise.all(srcs).then(srcs => console.log("\nsrcs\n", srcs));
        });
    });
};
get();
hymbzAuthor
§
Posted: 2024-07-21

@tony0809 非常感谢!已更新支持

Post reply

Sign in to post a reply.