Skip to content

Commit

Permalink
修复画廊详情解析失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojieonly committed Oct 29, 2024
1 parent e10b6f9 commit e1f4d20
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ public class GalleryDetailParser {

private static final DateFormat WEB_COMMENT_DATE_FORMAT = new SimpleDateFormat("dd MMMMM yyyy, HH:mm", Locale.US);

private static Integer EhSite;

static {
WEB_COMMENT_DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
}
Expand Down Expand Up @@ -662,23 +660,11 @@ public static int parsePages(String body) throws ParseException {
}

public static PreviewSet parsePreviewSet(Document d, String body) {
if (null == EhSite) {
EhSite = Settings.getGallerySite();
}

String previewClass;
switch (EhSite) {
case 0:
previewClass = body;
break;
case 1:
previewClass = d.getElementsByClass("gt200").html();
if (previewClass.isEmpty()) {
previewClass = d.getElementsByClass("gt100").html();
}
break;
default:
previewClass = "";
break;
previewClass = d.getElementsByClass("gt200").html();
if (previewClass.isEmpty()) {
previewClass = d.getElementsByClass("gt100").html();
}
PreviewSet previewSet;
try {
Expand Down

0 comments on commit e1f4d20

Please sign in to comment.