# Fanfix
+## Version 1.5.2
+- Fix tags metadata on FimFiction 4
+
## Version 1.5.1
- Update to FimFiction 4
-- fix some meta data that were missing on e-Hentai
+- Fix some meta data that were missing on e-Hentai
## Version 1.5.0
- New website supported following a request: e-hentai.org
@SuppressWarnings("resource")
Scanner scan = new Scanner(in, "UTF-8");
scan.useDelimiter("\\n");
+ boolean started = false;
while (scan.hasNext()) {
String line = scan.next();
- if (line.contains("story_category") && !line.contains("title=")) {
- int pos = line.indexOf('>');
- if (pos >= 0) {
- line = line.substring(pos + 1);
- pos = line.indexOf('<');
- if (pos >= 0) {
- line = line.substring(0, pos);
- }
+
+ if (!started) {
+ started = line.contains("\"story_container\"");
+ }
+
+ if (started && line.contains("class=\"tag-")) {
+ if (line.contains("index.php")) {
+ break; // end of *this story* tags
}
- line = line.trim();
- if (!tags.contains(line)) {
- tags.add(line);
+ String tab[] = line.split("<li>");
+ for (String subline : tab) {
+ subline = StringUtils.unhtml(subline).trim();
+ if (!subline.isEmpty() && !tags.contains(subline)) {
+ tags.add(subline);
+ }
}
}
}