Skip to content

Commit

Permalink
Fix the bug of parsing error when displaying page number in detail page
Browse files Browse the repository at this point in the history
修复在详情页展示页码时解析错误的bug
  • Loading branch information
jiangtian616 committed Oct 25, 2024
1 parent 0cac155 commit 9d64ea1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 34 deletions.
5 changes: 5 additions & 0 deletions changelog/v8.0.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- 修复在详情页展示页码时解析错误的bug

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

- Fix the bug of parsing error when displaying page number in detail page
6 changes: 3 additions & 3 deletions lib/src/utils/eh_spider_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1466,9 +1466,9 @@ class EHSpiderParser {
return thumbNailElements.map((element) {
String href = element.attributes['href'] ?? '';

/// small: width:100px;height:142px;background:transparent url(/cm/c74luy6g7ald4d3jtg/2867450-0.jpg) -0px 0 no-repeat
/// normal: width:200px;height:284px;background:transparent url(/t/be/ae/beaed99cde9bb18ab6d941a70ac62a66b985bc26-3632552-1550-2200-png_l.jpg) 0 0 no-repeat
String style = element.querySelector('div')?.attributes['style'] ?? '';
/// EX small : width: 100px; height: 150px; background: url("https://zoycbewnml.hath.network/cm/t30qzjudaml2zw3khn/3101655-0.jpg") 0px 0px no-repeat transparent;
/// EX normal: width: 200px; height: 300px; background: url("https://s.exhentai.org/t/7d/d6/7dd69bdafbbee70c842e83ba22ef13b51dd9e0b4-707631-960-1440-jpg_l.jpg") 0px 0px no-repeat transparent
String style = element.querySelector('div[style]')?.attributes['style'] ?? '';
String thumbUrl = RegExp(r'url\((.+)\)').firstMatch(style)!.group(1)!;
if (thumbUrl.startsWith('/')) {
GalleryImagePageUrl galleryImagePageUrl = GalleryImagePageUrl.parse(href);
Expand Down
57 changes: 29 additions & 28 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ packages:
dependency: "direct main"
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -601,11 +601,12 @@ packages:
flutter_slidable:
dependency: "direct main"
description:
name: flutter_slidable
sha256: "19ed4813003a6ff4e9c6bcce37e792a2a358919d7603b2b31ff200229191e44c"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
path: "."
ref: master
resolved-ref: "3280106581fc8d54eae45f4a446f92cae36d7837"
url: "https://github.com/letsar/flutter_slidable.git"
source: git
version: "3.1.1"
flutter_socks_proxy:
dependency: "direct main"
description:
Expand Down Expand Up @@ -637,18 +638,18 @@ packages:
dependency: "direct main"
description:
name: flutter_widget_from_html
sha256: d2ad036fb34a4f6ab84c21196788a5b1620f34d7930d16b32daadb511be24bb2
sha256: "9e2a6201c4d2eb910b6b3ebb2a9f5c490fc61c9a1aa35eafdde38f0fc659cf4c"
url: "https://pub.dev"
source: hosted
version: "0.14.10+1"
version: "0.15.2"
flutter_widget_from_html_core:
dependency: transitive
description:
name: flutter_widget_from_html_core
sha256: cc1d9be3d187ce668ee02091cd5442dfb050cdaf98e0ab9a4d12ad008f966979
sha256: b1048fd119a14762e2361bd057da608148a895477846d6149109b2151d2f7abf
url: "https://pub.dev"
source: hosted
version: "0.14.12"
version: "0.15.2"
flutter_windowmanager:
dependency: "direct main"
description:
Expand Down Expand Up @@ -702,18 +703,18 @@ packages:
dependency: transitive
description:
name: fwfh_just_audio
sha256: "209cf9644599e37b0edb6961c4f30ce80d156f5a53a50355f75fb4a22f9fdb0a"
sha256: "38dc2c55803bd3cef33042c473e0c40b891ad4548078424641a32032f6a1245f"
url: "https://pub.dev"
source: hosted
version: "0.14.3"
version: "0.15.2"
fwfh_svg:
dependency: transitive
description:
name: fwfh_svg
sha256: c6bb6b513f7ce2766aba76d7276caf9a96b6fee729ac3a492c366a42f82ef02e
sha256: "550b1014d12b5528d8bdb6e3b44b58721f3fb1f65d7a852d1623a817008bdfc4"
url: "https://pub.dev"
source: hosted
version: "0.8.2"
version: "0.8.3"
fwfh_url_launcher:
dependency: transitive
description:
Expand All @@ -726,10 +727,10 @@ packages:
dependency: transitive
description:
name: fwfh_webview
sha256: b828bb5ddd4361a866cdb8f1b0de4f3348f332915ecf2f4215ba17e46c656adc
sha256: f67890bc0d6278da98bd197469ae9511c859f7db327e92299fe0ea0cf46c4057
url: "https://pub.dev"
source: hosted
version: "0.14.8"
version: "0.15.2"
get:
dependency: "direct main"
description:
Expand Down Expand Up @@ -927,18 +928,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -1497,7 +1498,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
smart_auth:
dependency: transitive
description:
Expand Down Expand Up @@ -1590,10 +1591,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
Expand All @@ -1614,10 +1615,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
syncfusion_flutter_charts:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1926,10 +1927,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "14.3.0"
wakelock_plus:
dependency: "direct main"
description:
Expand Down
10 changes: 7 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
extended_image: 8.1.0
font_awesome_flutter: 9.2.0
intl: 0.19.0
collection: 1.18.0
collection: 1.19.0
clipboard: 0.1.3
scrollable_positioned_list: 0.3.5
flutter_list_view: 1.1.21
Expand All @@ -39,8 +39,12 @@ dependencies:
drift: 2.19.1+1
sqlite3_flutter_libs: 0.5.8
path_provider: 2.1.3
flutter_slidable: 3.0.1
flutter_widget_from_html: 0.14.10+1
# https://github.com/letsar/flutter_slidable/issues/488
flutter_slidable:
git:
url: https://github.com/letsar/flutter_slidable.git
ref: master
flutter_widget_from_html: 0.15.2
url_launcher: 6.1.8
# add onLongPress
like_button:
Expand Down

0 comments on commit 9d64ea1

Please sign in to comment.