{
  "schema": "trnovel-booksource/v2",
  "name": "书海阁小说网",
  "group": "网文",
  "url": "https://www.shuhaige.net",
  "http": {
    "headers": {
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36",
      "Referer": "https://www.shuhaige.net/"
    },
    "warmup": [
      "https://www.shuhaige.net/"
    ],
    "charset": "utf8",
    "fetcher": "auto",
    "timeout": 20000,
    "retry": {
      "max": 2,
      "backoffMs": 500
    }
  },
  "search": {
    "request": {
      "url": {
        "template": "{{base}}/search.html"
      },
      "method": "POST",
      "body": {
        "template": "searchkey={{key}}&searchtype=all"
      },
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded"
      }
    },
    "list": {
      "via": "css",
      "select": "#sitembox dl"
    },
    "item": {
      "bookUrl": {
        "via": "css",
        "select": "h3 a",
        "extract": {
          "attr": "href"
        }
      },
      "name": {
        "via": "css",
        "select": "h3 a",
        "extract": "text"
      },
      "cover": {
        "via": "css",
        "select": "dt img",
        "extract": {
          "attr": "src"
        }
      },
      "author": {
        "via": "css",
        "select": "dd.book_other span",
        "extract": "text",
        "index": 0
      },
      "intro": {
        "via": "css",
        "select": "dd.book_des",
        "extract": "text"
      }
    }
  },
  "explore": {
    "categories": [
      {
        "title": "玄幻",
        "url": {
          "template": "{{base}}/XuanHuan/{{page}}.html"
        }
      },
      {
        "title": "奇幻",
        "url": {
          "template": "{{base}}/QiHuan/{{page}}.html"
        }
      },
      {
        "title": "武侠",
        "url": {
          "template": "{{base}}/WuXia/{{page}}.html"
        }
      },
      {
        "title": "都市",
        "url": {
          "template": "{{base}}/DuShi/{{page}}.html"
        }
      },
      {
        "title": "历史",
        "url": {
          "template": "{{base}}/LiShi/{{page}}.html"
        }
      },
      {
        "title": "军事",
        "url": {
          "template": "{{base}}/JunShi/{{page}}.html"
        }
      },
      {
        "title": "最近更新",
        "url": {
          "template": "{{base}}/lastupdate/{{page}}.html"
        }
      }
    ],
    "list": {
      "via": "css",
      "select": "#newscontent .l ul li"
    },
    "item": {
      "bookUrl": {
        "via": "css",
        "select": "span.s2 a",
        "extract": {
          "attr": "href"
        }
      },
      "name": {
        "via": "css",
        "select": "span.s2 a",
        "extract": "text"
      },
      "author": {
        "via": "css",
        "select": "span.s4",
        "extract": "text"
      },
      "kind": {
        "via": "css",
        "select": "span.s1",
        "extract": "text"
      },
      "lastChapter": {
        "via": "css",
        "select": "span.s3 a",
        "extract": "text"
      }
    }
  },
  "bookInfo": {
    "name": {
      "firstOf": [
        {
          "via": "css",
          "select": "[property=\"og:novel:book_name\"]",
          "extract": {
            "attr": "content"
          }
        },
        {
          "via": "css",
          "select": "#info h1",
          "extract": "text"
        }
      ]
    },
    "author": {
      "via": "css",
      "select": "[property=\"og:novel:author\"]",
      "extract": {
        "attr": "content"
      }
    },
    "cover": {
      "via": "css",
      "select": "[property=\"og:image\"]",
      "extract": {
        "attr": "content"
      }
    },
    "intro": {
      "via": "css",
      "select": "[property=\"og:description\"]",
      "extract": {
        "attr": "content"
      }
    },
    "kind": {
      "concat": [
        {
          "via": "css",
          "select": "[property=\"og:novel:category\"]",
          "extract": {
            "attr": "content"
          }
        },
        {
          "via": "css",
          "select": "[property=\"og:novel:status\"]",
          "extract": {
            "attr": "content"
          }
        }
      ],
      "join": " · "
    },
    "lastChapter": {
      "via": "css",
      "select": "[property=\"og:novel:latest_chapter_name\"]",
      "extract": {
        "attr": "content"
      }
    },
    "tocUrl": {
      "via": "css",
      "select": "[property=\"og:novel:read_url\"]",
      "extract": {
        "attr": "content"
      }
    }
  },
  "toc": {
    "list": {
      "via": "css",
      "select": "#list dl dt:has(a[href*=\"txt_\"]) ~ dd a"
    },
    "name": {
      "via": "css",
      "select": "a",
      "extract": "text"
    },
    "url": {
      "via": "css",
      "select": "a",
      "extract": {
        "attr": "href"
      }
    },
    "maxPages": 1
  },
  "content": {
    "value": {
      "via": "css",
      "select": "#content",
      "extract": "html",
      "clean": [
        {
          "regex": "请收藏本站[^\\n]*",
          "replace": ""
        },
        {
          "regex": "[（(]本章未完[^\\n]*[）)]",
          "replace": ""
        },
        {
          "trim": true
        }
      ]
    },
    "maxPages": 1
  },
  "samples": [
    {
      "bookUrl": "/12653/",
      "expect": {
        "name": "全能主角导师",
        "minChapters": 2000,
        "minContentChars": 500
      }
    }
  ]
}
