Disallow empty gallery list result

It has to be a parse error
This commit is contained in:
FooIbar committed 2023-11-28 16:10:22 +08:00
1 parent 1f3546f3cc
commit 3a8dbcdb32
1 file changed
+2 -2
+2 -2
View File
@@ -209,7 +209,7 @@ pub fn parseGalleryInfoList(
if str.contains("<p>You do not have any watched tags") {
panic!("No watched tags!")
}
if str.contains("No hits found</p>") {
if str.contains("No hits found</p>") || str.contains("No unfiltered results found") {
panic!("No hits found!")
}
let itg = get_vdom_first_element_by_class_name(dom, "itg")?;
@@ -236,7 +236,7 @@ pub fn parseGalleryInfoList(
.to_string(),
)
});
Some(GalleryListResult {
(!info.is_empty()).then_some(GalleryListResult {
prev,
next,
galleryInfoList: info,