diff --git a/changelog/v7.5.4+221.md b/changelog/v7.5.4+221.md new file mode 100644 index 00000000..74ae6497 --- /dev/null +++ b/changelog/v7.5.4+221.md @@ -0,0 +1,5 @@ +- 修复评论解析、收藏解析 + +------------------------------------------------------------------------------------------ + +- Fix comment and favorites parsing \ No newline at end of file diff --git a/lib/src/model/gallery_note.dart b/lib/src/model/gallery_note.dart index 39410321..b5fb6a71 100644 --- a/lib/src/model/gallery_note.dart +++ b/lib/src/model/gallery_note.dart @@ -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}); } diff --git a/lib/src/utils/eh_spider_parser.dart b/lib/src/utils/eh_spider_parser.dart index e4b689a4..d0b8cfb8 100644 --- a/lib/src/utils/eh_spider_parser.dart +++ b/lib/src/utils/eh_spider_parser.dart @@ -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 favoritePage2FavoriteTagsAndCounts(Headers headers, dynamic data) { diff --git a/pubspec.yaml b/pubspec.yaml index 4987b72c..634b4ac5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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'