diff --git a/webnovel/h.syosetu.org.yaml b/webnovel/h.syosetu.org.yaml new file mode 100644 index 00000000..1daaccf9 --- /dev/null +++ b/webnovel/h.syosetu.org.yaml @@ -0,0 +1,81 @@ +# ------------------------------------------------------------ +# 小説サイト定義 +name: &name ハーメルンR18 +domain: h.syosetu.org +top_url: https?://\\k +url: + - \\k/novel/(?\d+) + - https?://h.syosetu.org/(?\d+) +encoding: UTF-8 +confirm_over18: no +append_title_to_folder_name: yes +title_strip_pattern: null +cookie: over18=off +sitename: ハーメルン +version: 1.4 + +# ------------------------------------------------------------ +# 目次取得設定 +toc_url: https://h.syosetu.org/novel/\\k/ +subtitles: |- + (?:
  • \s*
    (?.+?)
    \s*
  • \s* + )?\s*
  • + \s* + \s*.*? + \s*(?.+?) + \s* + \s*.*?\s*\s*
  • + +href: \\k.html + +error_message: 投稿者が削除、もしくは間違ったアドレスを指定しています|この作品は投稿者によって削除されました|この作品は完全非公開設定です|この小説は非公開設定になっています + +# ------------------------------------------------------------ +# 本文取得設定 + +body_pattern: |- + .+?

    + (?.+?) + (?:



    (?.+?)
    )? + +introduction_pattern:
    (?.+)


    < +postscript_pattern: null + +illust_current_url: null +illust_grep_pattern: 【挿絵表示】 + +# ------------------------------------------------------------ +# 小説情報からパースするための設定 +novel_info_url: https://h.syosetu.org/?mode=ss_detail&nid=\\k + +# タイトル +t: タイトル(?.+?)</a> + +# novel_type 小説種別 +nt: 話数</td><td.*?>(?<novel_type>.+?) .+?話</td> +novel_type_string: + 連載(連載中): 1 + 連載(未完): 1 + 連載(完結): 3 + 短編: 2 + +# general_all_no 掲載話数 +ga: 話数</td><td.*?>.+? (?<general_all_no>\d+)話</td> + +# story あらすじ +s: "あらすじ</td><td.*?>(?<story>.+?)</td>" + +# general_firstup 初回掲載日 +gf: 掲載開始</td><td.*?>(?<general_firstup>.+?)</td> + +# novelupdated_at 小説の更新時刻 +nu: null + +# general_lastup 最終掲載日 +gl: 最新投稿</td><td.*?>(?<general_lastup>.+?)</td> + +# writer 作者名 +w: 作者</td><td.*?>(?:<a href=.+?>)?(?<writer>.+?)(?:</a>)?</td> + +# length 文字数 +l: 合計文字数</td><td.*?>(?<length>.+?)文字 diff --git a/webnovel/ncode.syosetu.com.yaml b/webnovel/ncode.syosetu.com.yaml index 970f166a..3e686537 100644 --- a/webnovel/ncode.syosetu.com.yaml +++ b/webnovel/ncode.syosetu.com.yaml @@ -10,7 +10,7 @@ append_title_to_folder_name: yes title_strip_pattern: null cookie: over18=yes sitename: *name -version: 2.0 +version: 2.2 # ------------------------------------------------------------ # 目次取得設定 @@ -61,44 +61,49 @@ narou_api_url: https://api.syosetu.com/novelapi/api/ novel_info_url: \\k<top_url>/novelview/infotop/ncode/\\k<ncode>/ # タイトル -t: <h1><a href=".+?">(?<title>.+?)</a></h1> +t: |- + <h1 class="p-infotop-title"> + <a href=".+?">(?<title>.+?)</a> + </h1> # novel_type 小説種別 -nt: <span id="noveltype(?:.*?)">(?<novel_type>.+?)</span> +nt: <span class="p-infotop-type__type(?:.*?)">(?<novel_type>.+?)</span> novel_type_string: 連載中: 1 完結済: 3 短編: 2 # general_all_no 掲載話数 -ga: </span>全(?<general_all_no>\d+)エピソード +ga: <span class="p-infotop-type__allep">全(?<general_all_no>\d+)エピソード # story あらすじ -s: <td class="ex">(?<story>.+?)</td> +s: |- + <dt class="p-infotop-data__title">あらすじ</dt> + <dd class="p-infotop-data__value">(?<story>.+?)</dd> # general_firstup 初回掲載日 gf: |- - <th>掲載日</th> - <td>(?<general_firstup>.+?)</td> + <dt class="p-infotop-data__title">掲載日</dt> + <dd class="p-infotop-data__value">(?<general_firstup>.+?)</dd> # novelupdated_at 小説の更新時刻。連載小説だと書いてないので最終掲載日で代用 nu: |- - <th>(?:最終更新日|最新掲載日|最終掲載日)</th> - <td>(?: + <dt class="p-infotop-data__title">(?:最終更新日|最新掲載日|最終掲載日)</dt> + <dd class="p-infotop-data__value">(?: )?(?<novelupdated_at>.+?)(?: - )?</td> + )?</dd> # general_lastup 最終掲載日 gl: |- - <th>(?:最新掲載日|最終掲載日)</th> - <td>(?<general_lastup>.+?)</td> + <dt class="p-infotop-data__title">(?:最新掲載日|最終掲載日)</dt> + <dd class="p-infotop-data__value">(?<general_lastup>.+?)</dd> # writer 作者名 w: |- - <th>作者名</th> - <td>(?:<a href=".+?">)?(?<writer>.+?)(?:</a>)?.?</td> + <dt class="p-infotop-data__title">作者名</dt> + <dd class="p-infotop-data__value">(?:<a href=".+?">)?(?<writer>.+?)(?:</a>)?.?</dd> # length 文字数 l: |- - <th>文字数</th> - <td>(?<length>.+?)文字</td> + <dt class="p-infotop-data__title">文字数</dt> + <dd class="p-infotop-data__value">(?<length>.+?)文字</dd> diff --git a/webnovel/novel18.syosetu.com.yaml b/webnovel/novel18.syosetu.com.yaml index da1fb55e..5278f8db 100644 --- a/webnovel/novel18.syosetu.com.yaml +++ b/webnovel/novel18.syosetu.com.yaml @@ -12,10 +12,10 @@ cookie: over18=yes # 掲載サイト名は動的に取得する sitename: |- - <th>掲載サイト</th> - <td>(?<sitename>.+?)\(.+\)</td> + <dt class="p-infotop-data__title">掲載サイト</dt> + <dd class="p-infotop-data__value">(?<sitename>.+?)\(.+\)</dd> -version: 2.0 +version: 2.2 # ------------------------------------------------------------ # 目次取得設定 @@ -66,44 +66,49 @@ 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> +t: |- + <h1 class="p-infotop-title"> + <a href=".+?">(?<title>.+?)</a> + </h1> # novel_type 小説種別 -nt: <span id="noveltype(?:.*?)">(?<novel_type>.+?)</span> +nt: <span class="p-infotop-type__type(?:.*?)">(?<novel_type>.+?)</span> novel_type_string: 連載中: 1 完結済: 3 短編: 2 # general_all_no 掲載話数 -ga: </span>全(?<general_all_no>\d+)エピソード +ga: <span class="p-infotop-type__allep">全(?<general_all_no>\d+)エピソード # story あらすじ -s: <td class="ex">(?<story>.+?)</td> +s: |- + <dt class="p-infotop-data__title">あらすじ</dt> + <dd class="p-infotop-data__value">(?<story>.+?)</dd> # general_firstup 初回掲載日 gf: |- - <th>掲載日</th> - <td>(?<general_firstup>.+?)</td> + <dt class="p-infotop-data__title">掲載日</dt> + <dd class="p-infotop-data__value">(?<general_firstup>.+?)</dd> # novelupdated_at 小説の更新時刻。連載小説だと書いてないので最終掲載日で代用 nu: |- - <th>(?:最終更新日|最新掲載日|最終掲載日)</th> - <td>(?: + <dt class="p-infotop-data__title">(?:最終更新日|最新掲載日|最終掲載日)</dt> + <dd class="p-infotop-data__value">(?: )?(?<novelupdated_at>.+?)(?: - )?</td> + )?</dd> # general_lastup 最終掲載日 gl: |- - <th>(?:最新掲載日|最終掲載日)</th> - <td>(?<general_lastup>.+?)</td> + <dt class="p-infotop-data__title">(?:最新掲載日|最終掲載日)</dt> + <dd class="p-infotop-data__value">(?<general_lastup>.+?)</dd> # writer 作者名 w: |- - <th>作者名</th> - <td>(?:<a href=".+?">)?(?<writer>.+?)(?:</a>)?.?</td> + <dt class="p-infotop-data__title">作者名</dt> + <dd class="p-infotop-data__value">(?:<a href=".+?">)?(?<writer>.+?)(?:</a>)?.?</dd> # length 文字数 l: |- - <th>文字数</th> - <td>(?<length>.+?)文字</td> + <dt class="p-infotop-data__title">文字数</dt> + <dd class="p-infotop-data__value">(?<length>.+?)文字</dd> diff --git a/webnovel/syosetu.org.yaml b/webnovel/syosetu.org.yaml index f5a8248a..b84195ed 100644 --- a/webnovel/syosetu.org.yaml +++ b/webnovel/syosetu.org.yaml @@ -12,13 +12,19 @@ append_title_to_folder_name: yes title_strip_pattern: null cookie: over18=off sitename: *name -version: 1.0 +version: 1.4 # ------------------------------------------------------------ # 目次取得設定 toc_url: https://syosetu.org/novel/\\k<ncode>/ subtitles: |- - (?:<tr><td colspan=2><strong>(?<chapter>.+?)</strong></td></tr>)?<tr bgcolor="#.+?" class="bgcolor\d"><td width=60%><span id="(?<index>\d+?)"> </span> <a href=.+? style="text-decoration:none;">(?<subtitle>.+?)</a></td><td><NOBR>(?<subdate>.+?)(?:<span title="(?<subupdate>.+?)改稿">\(<u>改</u>\)</span>)?</NOBR></td></tr> + (?:<li class="episode-list__chapter">\s*<div class="episode-list__chapter-title">(?<chapter>.+?)</div>\s*</li>\s* + )?\s*<li class="episode-list__item.*?"> + \s*<a href="./(?<index>\d+?).html" class="episode-list__link"> + \s*<span class="episode-list__mark.*?">.*?</span> + \s*<span class="episode-list__title.*?" >(?<subtitle>.+?)</span> + \s*<time class="episode-list__date".*?>(?<subdate>.+?)</time> + \s*<span class="episode-list__revision"(?: title="(?<subupdate>.+?)改稿")?>.*?</span>\s*</a>\s*</li> href: \\k<index>.html