💰 欢乐书客

https://sk.hbooker.com

采集机器人 (2)2023/04/06

该用户很懒,什么介绍也没有写!
二维码导入
{
    "bookSourceUrl": "https:\/\/sk.hbooker.com",
    "bookSourceType": "0",
    "bookSourceName": "💰 欢乐书客",
    "bookSourceGroup": "💰 正版",
    "bookSourceComment": "◎开始使用时(搜索或调试)会自动游客登陆,若有账号请再输入账号登陆\n◎注意重复登录现在会触发验证码检查, 有封号的风险\n◎若要切换账号,请在[登陆界面]菜单中清除账号和密码进行[游客登录],再输入账号和密码登陆\n◎重复{点击√}登陆会在一段时间内无法账号登陆(需要等几个小时);如果需要请切换网络[wifi\/数据]重新尝试登陆,登陆成功后请勿频繁切换账号\n◎若报错请删除登陆按钮里面的登录头(登陆界面右上角的选项里),并且清除Cookie后重新再次进行登录\n◎因为操作过多,若点击登录√无反应请等待一会\n◎特性: 登陆|游客登录|签到|书架|发现页|购买(需要升级到最新版本≥3.22.081219)",
    "loginUrl": "<js>\n\/\/ 工具类\nvar key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nvar iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nvar aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\nvar RandomUtil = Packages.cn.hutool.core.util.RandomUtil\n\/\/ 参数\nlet userInfo = source.getLoginInfoMap()\nlet username = userInfo['手机号码\/邮箱'].trim()\nlet password = userInfo['密码'].trim()\nlet app_version = \"2.9.290\"\nlet device_token = `shuke_${RandomUtil.randomNumbers(15)}`\nlet login_token = RandomUtil.randomString(32)\nlet account = `%E4%B9%A6%E5%AE%A2${RandomUtil.randomNumbers(12)}`\nlet uuid = `android${java.randomUUID()}`\nvar params = `app_version=${app_version}&device_token=${device_token}&login_token=${login_token}&account=${account}`\n\/\/ 账号登录\nfunction login(username, password){\n  var loginUrl = `https:\/\/sk.hbooker.com\/signup\/login?${params}&login_name=${username}&passwd=${password}`\n  var autoRegUrl = `https:\/\/sk.hbooker.com\/signup\/auto_reg?oauth_union_id=&app_version=${app_version}&gender=1&oauth_open_id=&device_token=${device_token}&channel=TX&oauth_type=&uuid=${uuid}`\n  \/\/ 是否游客\n  let isLogin = !source.getLoginHeader()\n  let isAuto = username == '' || password == ''\n  if(isAuto && !isLogin){ \n     throw new Error(\"请勿重复登录,如若需要请清除登录头和Cookie\")\n  }\n  var url = isAuto ? autoRegUrl : loginUrl\n  \/\/ 获取登录信息\n  let res = JSON.parse(aes.decryptStr(java.ajax(url)))\n  if(res.tip) {\n    throw new Error(isAuto ? '自动登陆失败,请输入账号或切换网络重新登陆' : '账号登陆失败,请尝试切换网络或者等待几小时后重新登陆')\n  }\n  let login_token = res.data.login_token\n  let user_code = res.data.user_code\n  let reader_name = res.data.reader_info.reader_name\n  let account = res.data.reader_info.account\n  let rest_hlb = res.data.prop_info.rest_hlb\n  java.toast(isAuto ? '自动登陆成功,若有账号请输入账号进行登陆' : `${reader_name}【剩余欢乐币:${rest_hlb}】,登录成功!`)\n  \/\/ 获取书架\n  let bookList = java.ajax(`https:\/\/sk.hbooker.com\/bookshelf\/get_shelf_list?app_version=${app_version}&device_token=${device_token}&login_token=${login_token}&account=${account}`)\n  let shelf_list = JSON.parse(aes.decryptStr(bookList)).data.shelf_list[0]\n  let shelf_id = shelf_list.shelf_id\n  let reader_id = shelf_list.reader_id\n  \/\/ 登录完成\n  let header = {\n    \"app_version\": String(app_version),\n    \"device_token\": String(device_token),\n    \"login_token\": String(login_token),\n    \"account\": encodeURIComponent(account),\n    \"user_code\": String(user_code),\n    \"shelf_id\": String(shelf_id),\n    \"reader_name\": encodeURIComponent(reader_name),\n    \"reader_id\": String(reader_id),\n    \"rest_hlb\": String(rest_hlb)\n  }\n  return JSON.stringify(header)\n}\n\/\/ 写入登录头\nheader = login(username,password)\nsource.putLoginHeader(header)\n<\/js>",
    "loginUi": "[\n  {\n    \"name\": \"手机号码\/邮箱\",\n    \"type\": \"text\"\n  },\n  {\n    \"name\": \"密码\",\n    \"type\": \"password\"\n  }\n]",
    "loginCheckJs": "",
    "concurrentRate": "",
    "header": "{\n  \"user-agent\":\"Android  com.kuangxiangciweimao.novel 2.9.290\"\n}",
    "bookUrlPattern": "",
    "searchUrl": "<js>\n(function(key,page){\nif(!source.getLoginHeaderMap()){\n  \/\/ 自动登陆\n  source.login()\n}\nlet headerMap = source.getLoginHeaderMap()\nlet app_version = headerMap['app_version']\nlet device_token = headerMap['device_token']\nlet login_token = headerMap['login_token']\nlet account = headerMap['account']\nreturn `\/bookcity\/get_filter_search_book_list?app_version=${app_version}&count=10&page=${page - 1}&use_daguan=1&device_token=${device_token}&login_token=${login_token}&category_index=0&key=${key}&account=${account}`\n})(key,page)\n<\/js>",
    "exploreUrl": "[\n{\"title\":\"个人中心\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"每日签到\",\"url\":\"\/reader\/get_task_bonus_with_sign_recommend?app_version={{source.getLoginHeaderMap()['app_version']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&account={{source.getLoginHeaderMap()['account']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&task_type=1\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"每日任务\",\"url\":\"\/task\/get_all_task_list?app_version={{source.getLoginHeaderMap()['app_version']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&account={{source.getLoginHeaderMap()['account']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&task_type=1\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"个人书架\",\"url\":\"\/bookshelf\/get_shelf_book_list_new?order=last_read_time&app_version={{source.getLoginHeaderMap()['app_version']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&count=100&account={{source.getLoginHeaderMap()['account']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&page=0&shelf_id={{source.getLoginHeaderMap()['shelf_id']}}\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"全部分类\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=0&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"玄幻奇幻\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=8&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"都市青春\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=27&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"灵异未知\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=1&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"历史军事\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=30&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"科幻无限\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=6&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"游戏竞技\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=3&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"仙侠武侠\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=5&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"免费同人\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=24&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"女频小说\",\"url\":\"\/bookcity\/get_filter_search_book_list\n?app_version={{source.getLoginHeaderMap()['app_version']}}&filter_word=&count=10&tags=%5B%7B%22filter%22%3A%221%22%2C%22tag%22%3A%22%22%7D%5D&use_daguan=0&device_token={{source.getLoginHeaderMap()['device_token']}}&is_paid=&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&category_index=11&filter_uptime=&key=&account={{source.getLoginHeaderMap()['account']}}&up_status=&order=week_click\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 0.29}},\n{\"title\": \"小说榜单\",\"url\": \"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"新书月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=yp_new\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"新书总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=yp_new\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"点击榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=no_vip_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=no_vip_click\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月票榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=yp\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=yp\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"收藏榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"周榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=favor\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=favor\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=favor\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"畅销榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"周榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=fans_value\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=fans_value\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=fans_value\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"推荐榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"周榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=recommend\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=recommend\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=recommend\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"刀片榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=blade\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=blade\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"更新榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"周榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=word_count\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=word_count\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=word_count\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"吐槽榜\",\"url\":\"\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 1}},\n{\"title\":\"周榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=week&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=tsukkomi\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"月榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=month&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=tsukkomi\",\"style\": {\"layout_flexGrow\": 0.25,\"layout_flexBasisPercent\": -1}},\n{\"title\":\"总榜\",\"url\":\"\/bookcity\/get_rank_book_list?time_type=total&app_version={{source.getLoginHeaderMap()['app_version']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&count=10&login_token={{source.getLoginHeaderMap()['login_token']}}&page={{page-1}}&account={{source.getLoginHeaderMap()['account']}}&order=tsukkomi\",\"style\": {\"layout_flexGrow\": 0,\"layout_flexBasisPercent\": 0.29}}\n]",
    "enabled": true,
    "enabledExplore": true,
    "weight": 0,
    "customOrder": 3,
    "lastUpdateTime": 1661872554690,
    "ruleSearch": {
        "bookList": "<js>\n\/\/ 解密\nlet key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nlet iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nlet aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\nresult = aes.decryptStr(result)\nlet tip = JSON.parse(result).tip\nif(tip) {\n   java.toast(tip)\n   throw new Error(tip)\n}\n<\/js>\n$.data.book_list[*]",
        "name": "$.book_name",
        "author": "$.author_name",
        "kind": "$.tag&&$.book_src",
        "wordCount": "$.total_word_count",
        "lastChapter": "<js>\nlet title = java.getString(\"last_chapter_info.chapter_title\")\nlet time = java.getString(\"last_chapter_info.uptime\")\nif(!\/第.*章\/.test(title)){\n  title = `第${java.getString(\"last_chapter_info.chapter_index\")}章 ` + title\n}\n`${title} • ${time}`\n<\/js>",
        "intro": "$.description",
        "coverUrl": "$.cover",
        "bookUrl": "\/book\/get_info_by_id?app_version={{source.getLoginHeaderMap()['app_version']}}&book_id={{$.book_id}}&use_daguan=1&device_token={{source.getLoginHeaderMap()['device_token']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&account={{source.getLoginHeaderMap()['account']}}"
    },
    "ruleExplore": {
        "bookList": "<js>\nvar headerMap = source.getLoginHeaderMap()\n\/\/ 参数\nlet app_version = headerMap['app_version']\nlet account = headerMap['account']\nlet login_token = headerMap['login_token']\nlet device_token = headerMap['device_token']\nlet rest_hlb = headerMap['rest_hlb']\nlet params = `app_version=${app_version}&device_token=${device_token}&login_token=${login_token}&account=${account}`\nlet key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nlet iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nlet aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\n\/\/ 获取数据\nresult = aes.decryptStr(result)\nlet res = JSON.parse(result)\n\/\/ 签到\nif(\/get_task_bonus_with_sign_recommend.*\/.test(baseUrl)){\n  let hlb = res.tip ? 0 : Number(res.data.bonus.hlb)\n  \/\/ 获取书币\n  let walletUrl = `https:\/\/app.happybooker.cn\/reader\/get_wallet_info?${params}`\n  let walletRes = JSON.parse(aes.decryptStr(java.ajax(walletUrl)))\n  rest_hlb = walletRes.tip ? rest_hlb : Number(walletRes.data.wallet_info.rest_hlb) + hlb\n  let message = res.tip ? `${res.tip},当前剩余${rest_hlb}欢乐币`:`签到成功,获得${hlb}欢乐币,当前剩余${rest_hlb}欢乐币`\n  source.putLoginHeader(Object.assign(headerMap,{'rest_hlb': String(rest_hlb)}))\n  java.toast(message)\n  result={}\n} else if(res.tip) { \n   java.toast(res.tip)\n   throw new Error(res.tip)\n   result={}\n}\n<\/js>\n$.data.book_list[*]||$.data.daily_task_list[*]",
        "name": "$.book_name||$.book_info.book_name||$.name",
        "author": "$.author_name||$.book_info.author_name",
        "kind": "{{$.tag}}\n{{java.getString('total_count')!='' ? `总次数:${java.getString('total_count')}\/完成次数:${java.getString('complete_count')}` : ''}}\n{{java.getString(\"is_finished\") == 1 ? '完成': '未完成'}}",
        "wordCount": "$.total_word_count||$.book_info.total_word_count",
        "lastChapter": "<js>\nlet title = java.getString(\"last_chapter_info.chapter_title\")\nlet time = java.getString(\"last_chapter_info.uptime\")\nlet index = java.getString(\"last_chapter_info.chapter_index\")\nif(!\/第.*章\/.test(title)){\n  title = `第${index}章 ${title}`\n}\n!\/[bookshelf|get_all_task_list].*\/.test(baseUrl) ? `${title} • ${time}` : ''\n<\/js>",
        "intro": "$.description||$.bonus",
        "coverUrl": "$.cover||$.book_info.cover ",
        "bookUrl": "\/book\/get_info_by_id?app_version={{source.getLoginHeaderMap()['app_version']}}&book_id={{$.book_id||$.book_info.book_id}}&use_daguan=1&device_token={{source.getLoginHeaderMap()['device_token']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&account={{source.getLoginHeaderMap()['account']}}"
    },
    "ruleBookInfo": {
        "init": "<js>\nif(!\/book_id=.*\/.test(baseUrl)) throw new Error(\"缺少参数\")\nlet key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nlet iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nlet aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\nresult = aes.decryptStr(result)\nlet tip = JSON.parse(result).tip\nif(tip) {\n   java.toast(tip)\n   throw new Error(tip)\n}\n<\/js>\n$.data.book_info",
        "name": "$.book_name",
        "author": "$.author_name",
        "kind": "$.tag",
        "wordCount": "$.total_word_count",
        "lastChapter": "<js>\nlet title = java.getString(\"last_chapter_info.chapter_title\")\nlet time = java.getString(\"last_chapter_info.uptime\")\nif(!\/[第.*章|\\d+\\.]\/.test(title)){\n  title = `第${java.getString(\"last_chapter_info.chapter_index\")}章 ${title}`\n}\n`${title} • ${time}`\n<\/js>",
        "intro": "$.description",
        "coverUrl": "$.cover",
        "tocUrl": "\/chapter\/get_updated_chapter_by_division_new?division_id=0&account={{source.getLoginHeaderMap()['account']}}&device_token={{source.getLoginHeaderMap()['device_token']}}&app_version={{source.getLoginHeaderMap()['app_version']}}&login_token={{source.getLoginHeaderMap()['login_token']}}&book_id={{$.book_id}}"
    },
    "ruleToc": {
        "chapterList": "<js>\n\/\/ 解密\nlet key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nlet iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nlet aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\nlet app_version = source.getLoginHeaderMap()['app_version']\nlet account = source.getLoginHeaderMap()['account']\nlet login_token = source.getLoginHeaderMap()['login_token']\nlet device_token = source.getLoginHeaderMap()['device_token']\n\/\/ 章节列表\nlet res = JSON.parse(aes.decryptStr(result))\nif(res.tip) { \n   java.toast(res.tip)\n   throw new Error(res.tip)\n}\nlet chList = []\nres.data.chapter_list.forEach(volList => {\n chList.push({title: volList.division_name,voltype: true})\n volList.chapter_list.forEach(item=>{\n   chList.push({\n    cid: item.chapter_id,\n    title: item.chapter_title,\n    isVip: item.is_paid&&item.auth_access==0,\n    isPay: item.auth_access,\n    url: `https:\/\/sk.hbooker.com\/chapter\/get_chapter_command?app_version=${app_version}&chapter_id=${item.chapter_id}&login_token=${login_token}&account=${account}&device_token=${device_token}`,\n    info: `更新时间 ${item.mtime} 字数 ${item.word_count}`\n   })\n })\n})\nchList\n<\/js>",
        "chapterName": "title",
        "chapterUrl": "url",
        "isVolume": "voltype",
        "isVip": "isVip",
        "isPay": "isPay",
        "updateTime": "info"
    },
    "ruleContent": {
        "content": "<js>\n\/\/ 解密\nfunction decrypt(str1, str2){\n  let key = java.base64DecodeToByteArray(java.digestBase64Str(str2,\"sha256\"))\n  let iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\n  let aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\n  return aes.decryptStr(str1)\n}\nlet headerMap = source.getLoginHeaderMap()\n\/\/ 获取密钥\nlet app_version = headerMap['app_version']\nlet device_token = headerMap['device_token']\nlet account = headerMap['account']\nlet login_token = headerMap['login_token']\nlet rest_hlb = headerMap['rest_hlb']\nlet key = \"zG2nSeEfSHfvTCHy5LCcqtBbQehKNLXn\"\nlet cid = baseUrl.match(\/chapter_id=(\\d+)\/)[1]\nlet result = JSON.parse(decrypt(result,key))\nlet tip = result.tip\nif(tip){\n java.toast(tip)\n throw new Error(tip)\t\n}\nlet cmd = result.data.command\n\/\/ 正文内容\nlet body = java.ajax(`https:\/\/sk.hbooker.com\/chapter\/get_cpt_ifm?chapter_command=${cmd}&app_version=${app_version}&chapter_id=${cid}&login_token=${login_token}&account=${account}&device_token=${device_token}`)\nlet chInfo = JSON.parse(decrypt(body,key)).data.chapter_info\nlet unit_hlb = java.put('unit_hlb', chInfo.unit_hlb)\nlet content = decrypt(chInfo.txt_content,cmd)\nlet isPay = chInfo.is_paid && chInfo.auth_access == 0\nlet payText = `\\n本章是VIP章节,购买后才能阅读\\n本章需要${unit_hlb}币, 您有${rest_hlb}币,请点击右上角的购买按钮购买本章(请勿乱点),购买后自动加入到个人书架!`\nisPay ? content + payText : content \n<\/js>",
        "replaceRegex": "##<img[^>]*src=\"([^\"]*(?:\"[^>]+\\})?)\"[^>]*>",
        "payAction": "\/\/ 解密\nlet key = java.base64DecodeToByteArray(\"lXsAUe1NZEw6tAxM9w1Tpq2tU4la2+PwM8evj2C+yB0=\")\nlet iv = java.base64DecodeToByteArray(\"AAAAAAAAAAAAAAAAAAAAAA==\")\nlet aes = Packages.cn.hutool.crypto.symmetric.AES(\"CBC\",\"PKCS5Padding\", key, iv)\n\/\/ 参数\nlet headerMap = source.getLoginHeaderMap()\nlet app_version = headerMap['app_version']\nlet account = headerMap['account']\nlet login_token = headerMap['login_token']\nlet device_token = headerMap['device_token']\nlet shelf_id = headerMap['shelf_id']\nlet chapter_id = chapter.url.match(\/chapter_id=(\\d+)\/)[1]\nlet params = `app_version=${app_version}&device_token=${device_token}&login_token=${login_token}&account=${account}`\n\/\/ 开始购买\nlet payUrl = `https:\/\/sk.hbooker.com\/chapter\/buy?${params}&shelf_id=${shelf_id}&chapter_id=${chapter_id}`\nlet payRes = JSON.parse(aes.decryptStr(java.ajax(payUrl)))\nif(payRes.tip){\n java.toast(payRes.tip)\n throw new Error(payRes.tip)\t\n}\n\/\/ 更新书币\nlet propUrl = `https:\/\/sk.hbooker.com\/reader\/get_prop_info?${params}`\nlet propRes = JSON.parse(aes.decryptStr(java.ajax(propUrl)))\nif(propRes.tip){\n java.toast(propRes.tip)\n throw new Error(propRes.tip)\t\n}\nlet rest_hlb = propRes.data.prop_info.rest_hlb\njava.toast(`购买成功,剩余书币${rest_hlb},请手动刷新正文`)\nsource.putLoginHeader(Object.assign(headerMap,{'rest_hlb': String(rest_hlb)}))"
    }
}
广告