mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add meiliserach server support
Fix GalleryMetadata contains escaped html data
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { assert, assertEquals } from "std/testing/asserts.ts";
|
||||
import { Client } from "../client.ts";
|
||||
import { load_settings } from "../config.ts";
|
||||
import { API_PERMISSION } from "../test_base.ts";
|
||||
@@ -8,6 +9,17 @@ Deno.test({
|
||||
}, async () => {
|
||||
const cfg = await load_settings("./config.json");
|
||||
const client = new Client(cfg);
|
||||
const re = await client.fetchGalleryMetadataByAPI([2552611, "3132307627"]);
|
||||
const re = await client.fetchGalleryMetadataByAPI([1389215, "b5e43bd12d"]);
|
||||
console.log(re.obj);
|
||||
const gdata = re.map.get(1389215);
|
||||
assert(gdata !== undefined && typeof gdata !== "string");
|
||||
assertEquals(
|
||||
gdata.title,
|
||||
"(C95) [Shiratamaco (Shiratama)] Usagi Syndrome 4 (Gochuumon wa Usagi desu ka?) [Chinese] [白玉症候群&绅士仓库联合汉化]",
|
||||
);
|
||||
const gmeta = re.convert(gdata);
|
||||
assertEquals(
|
||||
gmeta.title,
|
||||
"(C95) [Shiratamaco (Shiratama)] Usagi Syndrome 4 (Gochuumon wa Usagi desu ka?) [Chinese] [白玉症候群&绅士仓库联合汉化]",
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user