Skip to content

Commit

Permalink
Fix comment and favorites parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangtian616 committed May 21, 2024
1 parent cf65ecd commit 84a6a58
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions changelog/v7.5.4+221.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- 修复评论解析、收藏解析

------------------------------------------------------------------------------------------

- Fix comment and favorites parsing
6 changes: 1 addition & 5 deletions lib/src/model/gallery_note.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
class GalleryNote {
final String note;

final int usedSlot;

bool get isFull => usedSlot >= 1000;

const GalleryNote({required this.note, required this.usedSlot});
const GalleryNote({required this.note});
}
3 changes: 1 addition & 2 deletions lib/src/utils/eh_spider_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,8 @@ class EHSpiderParser {

/// 1 / 1000 favorite note slots used. [?]
String usedSlotDesc = document.querySelector('#galpop > div > div:nth-child(3) > div:nth-child(6)')!.text;
int usedSlot = int.parse(RegExp(r'(\d+) / 1000').firstMatch(usedSlotDesc)!.group(1)!);

return GalleryNote(note: note, usedSlot: usedSlot);
return GalleryNote(note: note);
}

static Map<String, List> favoritePage2FavoriteTagsAndCounts(Headers headers, dynamic data) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: jhentai
description: A flutter app for E-Hentai/EXHentai

publish_to: 'none'
version: 7.5.4+220
version: 7.5.4+221

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down

0 comments on commit 84a6a58

Please sign in to comment.