diff --git a/lib/component/eh/eh_bookmark.dart b/lib/component/eh/eh_bookmark.dart index 9a14790be..d18fa8eab 100644 --- a/lib/component/eh/eh_bookmark.dart +++ b/lib/component/eh/eh_bookmark.dart @@ -4,6 +4,7 @@ import 'dart:collection'; import 'package:violet/component/eh/eh_headers.dart'; +import 'package:violet/log/log.dart'; class EHBookmark { static List>? bookmarkInfo; @@ -12,8 +13,8 @@ class EHBookmark { // https://exhentai.org/favorites.php?page=0&favcat=0 var result = >[]; - var rr = RegExp(r'https://exhentai\.org/g/\d+/'); - var r2 = RegExp(r'https://e\-hentai\.org/g/\d+/'); + var rr = RegExp(r'https://exhentai\.org/g/\d+/a-zA-Z0-9+'); + var r2 = RegExp(r'https://e\-hentai\.org/g/\d+/a-zA-Z0-9+'); for (int i = 0; i < 10; i++) { var hh = HashSet(); @@ -21,6 +22,7 @@ class EHBookmark { for (int j = 0; j < 1000; j++) { var html = await EHSession.requestString( 'https://exhentai.org/favorites.php?page=$j&favcat=$i'); + Logger.info(html); var matched = rr.allMatches(html).map((e) => e.group(0)); if (matched.isEmpty) break; for (var element in matched) { diff --git a/lib/pages/settings/login/ehentai_login.dart b/lib/pages/settings/login/ehentai_login.dart index 14e8e686f..7bb18f48f 100644 --- a/lib/pages/settings/login/ehentai_login.dart +++ b/lib/pages/settings/login/ehentai_login.dart @@ -69,7 +69,7 @@ class _LoginScreenState extends State { developer.log('Get cookies: $cookies'); if (cookies.containsKey('ipb_member_id') && - cookies.containsKey('igneous') && + cookies.containsKey('sk') && cookies.containsKey('ipb_pass_hash')) { // await sessionStore.setSession(cookieString); // await _cookieManager.clearCookies(); diff --git a/lib/pages/settings/settings_page.dart b/lib/pages/settings/settings_page.dart index 43456d5fb..04c4cd150 100644 --- a/lib/pages/settings/settings_page.dart +++ b/lib/pages/settings/settings_page.dart @@ -2269,7 +2269,7 @@ class _SettingsPageState extends State var iController = TextEditingController( text: - cookie != null ? parseCookies(cookie)['igneous'] : ''); + cookie != null ? parseCookies(cookie)['sk'] : ''); var imiController = TextEditingController( text: cookie != null ? parseCookies(cookie)['ipb_member_id'] @@ -2304,7 +2304,7 @@ class _SettingsPageState extends State mainAxisSize: MainAxisSize.min, children: [ Row(children: [ - const Text('igneous: '), + const Text('sk: '), Expanded( child: TextField( controller: iController, @@ -2334,7 +2334,7 @@ class _SettingsPageState extends State if (dialog != null && dialog == true) { var ck = - 'igneous=${iController.text};ipb_member_id=${imiController.text};ipb_pass_hash=${iphController.text};'; + 'sk=${iController.text};ipb_member_id=${imiController.text};ipb_pass_hash=${iphController.text};'; await prefs.setString('eh_cookies', ck); } }