Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions plugins/portuguese/blogdoamonnovels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type BloggerEntry = {
class BlogDoAnonNovelsPlugin implements Plugin.PluginBase {
id = 'blogdoamonnovels';
name = 'Blog do Amon Novels';
version = '1.0.1';
version = '1.0.2';
icon = 'src/pt-br/blogdoamonnovels/icon.png';
site = 'https://www.blogdoamonnovels.com';

Expand Down Expand Up @@ -120,7 +120,9 @@ class BlogDoAnonNovelsPlugin implements Plugin.PluginBase {
.toArray()
.join(',');

const cat = loadedCheerio('#clwd').text().split("'")[1];
const cat =
/categoria\s*=\s*"([^"]+)"/.exec(body)?.[1] ??
loadedCheerio('#clwd').text().split("'")[1];

if (!cat) {
const chapters: Plugin.ChapterItem[] = [];
Expand Down
12 changes: 8 additions & 4 deletions plugins/portuguese/illusia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Illusia implements Plugin.PluginBase {
name = 'Illusia';
icon = 'src/pt-br/illusia/icon.png';
site = 'https://illusia.com.br';
version = '1.0.2';
version = '1.0.3';
filters: Filters | undefined = undefined;

headers = {
Expand Down Expand Up @@ -96,7 +96,9 @@ class Illusia implements Plugin.PluginBase {

const novel: Plugin.SourceNovel = {
path: novelPath,
name: loadedCheerio('h1.story__identity-title, h1.post-title')
name: loadedCheerio(
'h1.illusia-single-story__title, h1.story__identity-title, h1.post-title',
)
.text()
.trim(),
};
Expand Down Expand Up @@ -131,6 +133,7 @@ class Illusia implements Plugin.PluginBase {
novel.author = author || 'Desconhecido';

novel.cover =
loadedCheerio('img.illusia-single-story__cover-img').attr('data-src') ||
loadedCheerio('figure.story__thumbnail img').attr('data-src') ||
loadedCheerio('figure.story__thumbnail img').attr('src') ||
loadedCheerio('.story__thumbnail img').attr('data-src') ||
Expand All @@ -147,7 +150,7 @@ class Illusia implements Plugin.PluginBase {

let summaryHtml =
loadedCheerio(
'section.story__summary, div.story__summary, .summary',
'div.illusia-single-story__description, section.story__summary, div.story__summary, .summary',
).html() || '';
summaryHtml = summaryHtml
.replace(/<br\s*\/?>/gi, '\n')
Expand Down Expand Up @@ -323,7 +326,8 @@ class Illusia implements Plugin.PluginBase {
return uniqueNovels;
}

// resolveUrl = (path: string, isNovel?: boolean) => `${this.site}/${path}/`;
resolveUrl = (path: string) =>
/^https?:\/\//.test(path) ? path : `${this.site}/${path}/`;
}

export default new Illusia();