Skip to content

Commit 68eb0b8

Browse files
authored
fix ranobeLib (#1803)
* fix * fix AT
1 parent cd583a0 commit 68eb0b8

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/plugins/russian/authortoday.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class AuthorToday implements Plugin.PluginBase {
1111
name = 'Автор Тудей';
1212
icon = 'src/ru/authortoday/icon.png';
1313
site = 'https://author.today';
14-
version = '1.2.0';
14+
version = '1.2.1';
1515

1616
private userAgent =
1717
'Mozilla/5.0 (Android 15; Mobile; rv:138.0) Gecko/138.0 Firefox/138.0';
@@ -140,7 +140,11 @@ class AuthorToday implements Plugin.PluginBase {
140140
isParsingGenres = true;
141141
if (novel.genres) novel.genres = '';
142142
}
143-
if (name === 'label' && attribs['class'].includes('label')) {
143+
if (
144+
name === 'label' &&
145+
attribs['class'] &&
146+
attribs['class'].includes('label')
147+
) {
144148
isParsingStatus = true;
145149
}
146150
if (name === 'li' && attribs['class'] === 'clearfix') {

src/plugins/russian/ranobelib.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ class RLIB implements Plugin.PluginBase {
1818
name = 'RanobeLib';
1919
site = 'https://ranobelib.me';
2020
apiSite = 'https://api.cdnlibs.org/api/manga/';
21-
version = '2.2.0';
21+
version = '2.2.1';
2222
icon = 'src/ru/ranobelib/icon.png';
2323
webStorageUtilized = true;
24+
imageRequestInit = {
25+
headers: {
26+
Accept:
27+
'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
28+
Referer: this.site,
29+
},
30+
};
2431

2532
async popularNovels(
2633
pageNo: number,
@@ -95,7 +102,7 @@ class RLIB implements Plugin.PluginBase {
95102
async parseNovel(novelPath: string): Promise<Plugin.SourceNovel> {
96103
const { data }: { data: DataClass } = await fetchApi(
97104
`${this.apiSite}${novelPath}?fields[]=summary&fields[]=genres&fields[]=tags&fields[]=teams&fields[]=authors&fields[]=status_id&fields[]=artists`,
98-
{ headers: this.user?.token },
105+
{ headers: { ...this.user?.token, 'Site-Id': '3' } },
99106
).then(res => res.json());
100107

101108
const novel: Plugin.SourceNovel = {

0 commit comments

Comments
 (0)