Skip to content

Commit 4961f7d

Browse files
committed
Fix nhentai not working
1. nhentai not uploading new images to i, i5 and i7, they will probably be deprecated. 2. Since e-hentai exhentai uses .webp for preview images, nhentai should adjust to it too.
1 parent d82528c commit 4961f7d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

eh2telegraph/src/collector/nhentai.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ lazy_static::lazy_static! {
2626
}
2727

2828
const DOMAIN_LIST: [&str; 0] = [];
29-
const NH_CDN_LIST: [&str; 5] = [
30-
"https://i.nhentai.net/galleries",
29+
const NH_CDN_LIST: [&str; 4] = [
30+
"https://i1.nhentai.net/galleries",
3131
"https://i2.nhentai.net/galleries",
3232
"https://i3.nhentai.net/galleries",
33-
"https://i5.nhentai.net/galleries",
34-
"https://i7.nhentai.net/galleries",
33+
"https://i4.nhentai.net/galleries",
3534
];
3635

3736
#[derive(Debug, Clone, Default)]
@@ -103,6 +102,8 @@ enum ImageType {
103102
Png,
104103
#[serde(rename = "g")]
105104
Gif,
105+
#[serde(rename = "w")]
106+
Webp,
106107
}
107108

108109
impl ImageType {
@@ -111,6 +112,7 @@ impl ImageType {
111112
ImageType::Jpg => ".jpg",
112113
ImageType::Png => ".png",
113114
ImageType::Gif => ".gif",
115+
ImageType::Webp => ".webp",
114116
}
115117
}
116118
}

0 commit comments

Comments
 (0)