Skip to content

Commit 0baad73

Browse files
committed
Site www.wuxiaworld.eu renamed wuxia.click
See: #892
1 parent 1390bf1 commit 0baad73

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugin/js/parsers/WuxiaworldeuParser.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
"use strict";
22

33
parserFactory.register("wuxiaworld.eu", () => new WuxiaworldeuParser());
4+
parserFactory.register("wuxia.click", () => new WuxiaworldeuParser());
45

56
class WuxiaworldeuParser extends Parser{
67
constructor() {
78
super();
89
}
910

1011
async getChapterUrls(dom) {
12+
let host = new URL(dom.baseURI).host;
1113
let tocUrl = dom.baseURI.replace("/novel/", "/api/chapters/") + "/";
1214
let json = (await HttpClient.fetchJson(tocUrl)).json;
13-
return json.map(this.toChapter);
15+
return json.map(j => this.toChapter(j, host));
1416
}
1517

16-
toChapter(json) {
18+
toChapter(json, host) {
1719
return ({
18-
sourceUrl: "https://www.wuxiaworld.eu/chapter/" + json.novSlugChapSlug,
20+
sourceUrl: `https://${host}/chapter/${json.novSlugChapSlug}`,
1921
title: json.title
2022
});
2123
}

0 commit comments

Comments
 (0)