# ------------------------------------------------------------
# 小説サイト定義
name: 小説家になろうR18
domain: novel18.syosetu.com
top_url: https://\\k<domain>
url: https?://\\k<domain>/(?<ncode>n\d+[a-z]+)
encoding: UTF-8
confirm_over18: yes
append_title_to_folder_name: yes
title_strip_pattern: null
cookie: over18=yes

# 掲載サイト名は動的に取得する
sitename: |-
  <th>掲載サイト</th>
  <td>(?<sitename>.+?)\(.+\)</td>

version: 1.0

# ------------------------------------------------------------
# 目次取得設定
toc_url: https://\\k<domain>/\\k<ncode>/
subtitles: |-
  (?:<div class="chapter_title">(?<chapter>.+?)</div>
   
  )?<dl class="novel_sublist2">
  <dd class="subtitle">
  <a href="(?<href>/.+?/(?<index>\d+?)/)">(?<subtitle>.+?)</a>
  </dd>
  <dt class="long_update">
  (?<subdate>.+?)(?:
  <span title="(?<subupdate>.+?) 改稿">
  (<u>改</u>)</span>)?
  </dt>
  </dl>

# ------------------------------------------------------------
# 特殊な設定
is_narou: true
tcode: <li><a href="\\k<top_url>/txtdownload/top/ncode/(?<tcode>\d+?)/" onclick
txtdownload_url: \\k<top_url>/txtdownload/dlstart/ncode/\\k<tcode>/?no=\\k<index>
narou_api_url: https://api.syosetu.com/novel18api/api/

# ------------------------------------------------------------
# 小説情報からパースするための設定
novel_info_url: \\k<top_url>/novelview/infotop/ncode/\\k<ncode>/

# タイトル
t: <h1><a href=".+?">(?<title>.+?)</a></h1>

# novel_type 小説種別
nt: <span id="noveltype(?:.*?)">(?<novel_type>.+?)</span>
novel_type_string:
  連載中: 1
  完結済: 3
  短編: 2

# general_all_no 掲載話数
ga: </span>全(?<general_all_no>\d+)部

# story あらすじ
s: <td class="ex">(?<story>.+?)</td>

# general_firstup 初回掲載日
gf: |-
  <th>掲載日</th>
  <td>(?<general_firstup>.+?)</td>

# novelupdated_at 小説の更新時刻。連載小説だと書いてないので最終掲載日で代用
nu: |-
  <th>(?:最終更新日|最終話掲載日)</th>
  <td>(?:
  )?(?<novelupdated_at>.+?)(?:
  )?</td>

# general_lastup 最終話掲載日
gl: |-
  <th>最終話掲載日</th>
  <td>(?<general_lastup>.+?)</td>

# writer 作者名
w: |-
  <th>作者名</th>
  <td>(?:<a href=".+?">)?(?<writer>.+?)(?:</a>)?.?</td>

# length 文字数
l: |-
  <th>文字数</th>
  <td>(?<length>.+?)文字</td>