Madara rework & Lightnovelwp update (#819)
* fix hizomanga * added filters for systemtranslation & whitemoonlightnovels * fix typos in lightnovelwp README * fix arnovel domain change * Madra: - added version Increments for sources * Madara rework: - filters in seperate folder - added generator for filters - added README - removed path in sources (getting genres from advanced search) - added checking for Captcha errors - simplified code - better filter management - madara/icons/*.png => madara/*.png * lightnovelwp: - better checks for Captcha - better log * madra: - removed console.log * Madara: - get_filter.ts better log * Madara added sources: - Pancho Translations (SP) - Salmon Latte (EN) - Asura Light Novel (EN) - Fans Translations (EN) - Novel Lucky (TH) - new Thai language * freewebnovel: - Web NOVEL => Free Web Novel * Madara: - icon filename from id instead of name * Madara: - added filters for new sources
This commit is contained in:
@@ -28,5 +28,5 @@ and add it to the folder "icons/multisrc/lightnovelwp" named as the id of the so
|
||||
|
||||
To add filters to a source you need to run the script "get_filters.ts" \
|
||||
(./node_modules/.bin/ts-node scripts/multisrc/lightnovelwp/get_filters.ts
|
||||
(if you are in the root of the project) (and you have run "npm install" before))
|
||||
(if you are at the root of the project) (and you have ran "npm install" before))
|
||||
and follow the instructions (url is easier and faster but sometimes it doesn't work)
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"filters": {
|
||||
"genre[]": {
|
||||
"type": "Checkbox",
|
||||
"label": "Genre",
|
||||
"value": [],
|
||||
"options": [
|
||||
{
|
||||
"label": "Action",
|
||||
"value": "action"
|
||||
},
|
||||
{
|
||||
"label": "Adventure",
|
||||
"value": "adventure"
|
||||
},
|
||||
{
|
||||
"label": "Anime & Comics",
|
||||
"value": "anime-comics"
|
||||
},
|
||||
{
|
||||
"label": "Comedy",
|
||||
"value": "comedy"
|
||||
},
|
||||
{
|
||||
"label": "Drama",
|
||||
"value": "drama"
|
||||
},
|
||||
{
|
||||
"label": "Fan-Fiction",
|
||||
"value": "fan-fiction"
|
||||
},
|
||||
{
|
||||
"label": "Fantasy",
|
||||
"value": "fantasy"
|
||||
},
|
||||
{
|
||||
"label": "Gender Bender",
|
||||
"value": "gender-bender"
|
||||
},
|
||||
{
|
||||
"label": "Harem",
|
||||
"value": "harem"
|
||||
},
|
||||
{
|
||||
"label": "Isekai",
|
||||
"value": "isekai"
|
||||
},
|
||||
{
|
||||
"label": "Martial Arts",
|
||||
"value": "martial-arts"
|
||||
},
|
||||
{
|
||||
"label": "Mystery",
|
||||
"value": "mystery"
|
||||
},
|
||||
{
|
||||
"label": "School Life",
|
||||
"value": "school-life"
|
||||
},
|
||||
{
|
||||
"label": "Sci-fi",
|
||||
"value": "sci-fi"
|
||||
},
|
||||
{
|
||||
"label": "Seinen",
|
||||
"value": "seinen"
|
||||
},
|
||||
{
|
||||
"label": "Supernatural",
|
||||
"value": "supernatural"
|
||||
},
|
||||
{
|
||||
"label": "Tragedy",
|
||||
"value": "tragedy"
|
||||
},
|
||||
{
|
||||
"label": "Wuxia",
|
||||
"value": "wuxia"
|
||||
},
|
||||
{
|
||||
"label": "Xianxia",
|
||||
"value": "xianxia"
|
||||
},
|
||||
{
|
||||
"label": "Xuanhuan",
|
||||
"value": "xuanhuan"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type[]": {
|
||||
"type": "Checkbox",
|
||||
"label": "Type",
|
||||
"value": [],
|
||||
"options": []
|
||||
},
|
||||
"status": {
|
||||
"type": "Picker",
|
||||
"label": "Status",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "All",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"label": "Ongoing",
|
||||
"value": "ongoing"
|
||||
},
|
||||
{
|
||||
"label": "Hiatus",
|
||||
"value": "hiatus"
|
||||
},
|
||||
{
|
||||
"label": "Completed",
|
||||
"value": "completed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"order": {
|
||||
"type": "Picker",
|
||||
"label": "Order by",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "Default",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"label": "A-Z",
|
||||
"value": "title"
|
||||
},
|
||||
{
|
||||
"label": "Z-A",
|
||||
"value": "titlereverse"
|
||||
},
|
||||
{
|
||||
"label": "Latest Update",
|
||||
"value": "update"
|
||||
},
|
||||
{
|
||||
"label": "Latest Added",
|
||||
"value": "latest"
|
||||
},
|
||||
{
|
||||
"label": "Popular",
|
||||
"value": "popular"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"filters": {
|
||||
"genre[]": {
|
||||
"type": "Checkbox",
|
||||
"label": "Genre",
|
||||
"value": [],
|
||||
"options": [
|
||||
{
|
||||
"label": "Action",
|
||||
"value": "action"
|
||||
},
|
||||
{
|
||||
"label": "Adventure",
|
||||
"value": "adventure"
|
||||
},
|
||||
{
|
||||
"label": "Boy's Love",
|
||||
"value": "boys-love"
|
||||
},
|
||||
{
|
||||
"label": "Business",
|
||||
"value": "business"
|
||||
},
|
||||
{
|
||||
"label": "Completed",
|
||||
"value": "completed"
|
||||
},
|
||||
{
|
||||
"label": "Cultivation",
|
||||
"value": "cultivation"
|
||||
},
|
||||
{
|
||||
"label": "Dropped",
|
||||
"value": "dropped"
|
||||
},
|
||||
{
|
||||
"label": "Entertainment Industry",
|
||||
"value": "entertainment-industry"
|
||||
},
|
||||
{
|
||||
"label": "Gaming",
|
||||
"value": "gaming"
|
||||
},
|
||||
{
|
||||
"label": "Ger",
|
||||
"value": "ger"
|
||||
},
|
||||
{
|
||||
"label": "Modern",
|
||||
"value": "modern"
|
||||
},
|
||||
{
|
||||
"label": "Omegaverse",
|
||||
"value": "omegaverse"
|
||||
},
|
||||
{
|
||||
"label": "Rebirth",
|
||||
"value": "rebirth"
|
||||
},
|
||||
{
|
||||
"label": "Revenge",
|
||||
"value": "revenge"
|
||||
},
|
||||
{
|
||||
"label": "Romance",
|
||||
"value": "romance"
|
||||
},
|
||||
{
|
||||
"label": "School Life",
|
||||
"value": "school-life"
|
||||
},
|
||||
{
|
||||
"label": "Supernatural",
|
||||
"value": "supernatural"
|
||||
},
|
||||
{
|
||||
"label": "Survival",
|
||||
"value": "survival"
|
||||
},
|
||||
{
|
||||
"label": "System",
|
||||
"value": "system"
|
||||
},
|
||||
{
|
||||
"label": "Transmigration",
|
||||
"value": "transmigration"
|
||||
},
|
||||
{
|
||||
"label": "Unlimited Flow",
|
||||
"value": "unlimited-flow"
|
||||
},
|
||||
{
|
||||
"label": "Variety Show",
|
||||
"value": "variety-show"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type[]": {
|
||||
"type": "Checkbox",
|
||||
"label": "Type",
|
||||
"value": [],
|
||||
"options": []
|
||||
},
|
||||
"status": {
|
||||
"type": "Picker",
|
||||
"label": "Status",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "All",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"label": "Ongoing",
|
||||
"value": "ongoing"
|
||||
},
|
||||
{
|
||||
"label": "Hiatus",
|
||||
"value": "hiatus"
|
||||
},
|
||||
{
|
||||
"label": "Completed",
|
||||
"value": "completed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"order": {
|
||||
"type": "Picker",
|
||||
"label": "Order by",
|
||||
"value": "",
|
||||
"options": [
|
||||
{
|
||||
"label": "Default",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"label": "A-Z",
|
||||
"value": "title"
|
||||
},
|
||||
{
|
||||
"label": "Z-A",
|
||||
"value": "titlereverse"
|
||||
},
|
||||
{
|
||||
"label": "Latest Update",
|
||||
"value": "update"
|
||||
},
|
||||
{
|
||||
"label": "Latest Added",
|
||||
"value": "latest"
|
||||
},
|
||||
{
|
||||
"label": "Popular",
|
||||
"value": "popular"
|
||||
},
|
||||
{
|
||||
"label": "Rating",
|
||||
"value": "rating"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ export const generateAll: ScrpitGeneratorFunction = function (name) {
|
||||
filters = require(`./filters/${source.id}`);
|
||||
source.filters = filters.filters;
|
||||
} catch (e) {}
|
||||
console.log(`[${name}] Generating:`, source.id, source.filters? "\t🔎with filters🔍" : "\t🚫no filters🚫");
|
||||
console.log(`[${name}] Generating: ${source.id}${" ".repeat(20 - source.id.length)} ${source.filters ? "🔎with filters🔍" : "🚫no filters🚫"}`);
|
||||
return generator(source);
|
||||
});
|
||||
};
|
||||
@@ -22,7 +22,7 @@ const generator = function generator(source: LightNovelWPMetadata) {
|
||||
});
|
||||
|
||||
const pluginScript = `
|
||||
${LightNovelWPTemplate}
|
||||
${LightNovelWPTemplate}
|
||||
const plugin = new LightNovelWPPlugin(${JSON.stringify(source)});
|
||||
export default plugin;
|
||||
`.trim();
|
||||
|
||||
@@ -47,7 +47,7 @@ class LightNovelWPPlugin implements Plugin.PluginBase {
|
||||
const $ = load(await r.text());
|
||||
const title = $("title").text().trim();
|
||||
if (this.getHostname(url) != this.getHostname(r.url) ||
|
||||
title == "Bot Verification" || title == "You are being redirected...")
|
||||
title == "Bot Verification" || title == "You are being redirected..." || title == "Un instant..." || title == "Just a moment..." || title == "Redirecting...")
|
||||
throw new Error("Captcha error, please open in webview");
|
||||
|
||||
return ($);
|
||||
|
||||
Reference in New Issue
Block a user