Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ------------------------------------------------------------
- # 小説サイト定義
- name: &name カクヨム
- scheme: https
- domain: kakuyomu.jp
- top_url: \\k<scheme>://\\k<domain>
- url: \\k<top_url>/works/(?<ncode>\d+)
- encoding: UTF-8
- confirm_over18: no
- append_title_to_folder_name: yes
- title_strip_pattern: (^【.+?】|【.+?】$)
- sitename: *name
- version: 1.0
- # ------------------------------------------------------------
- # 書籍情報取得設定
- title: &title >-
- <h1[^>]*><span[^>]*><a[^>]*>(?<title>.+?)</a></span></h1>
- author: >-
- </h1><div><div[^>]*><div[^>]*><a href="/users/[^>]+>(?<author>.+?)</a></div></div></div>
- story: &story >-
- (?x)
- <div.class="CollapseTextWithKakuyomuLinks_collapseText[^>]*>
- (?<story>.+?)
- #(?:<span.class="CollapseTextWithKakuyomuLinks_expandButtonLabel.+?>)?
- </div>
- # "introduction":"(?<story>.+?)",
- # ------------------------------------------------------------
- # 目次取得設定
- toc_url: \\k<top_url>/works/\\k<ncode>
- subtitles: (?x)
- (?:"level":1,"title":"(?<chapter>(?:[^"]|\\")+)"},)?
- (?:(?:"TableOfContentsChapter:\d+":{[^\]]+\]},)?
- "Chapter:\d+":{"__typename":"Chapter","id":"\d+",
- "level":2,"title":"(?<subchapter>(?:[^"]|\\")+)"
- },)?
- "Episode:\d+":{
- "__typename":"Episode",
- "id":"(?<index>\d+)",
- "title":"(?<subtitle>(?:[^"]|\\")+)",
- "publishedAt":"(?<subupdate>[^"]+)"
- }
- href: /works/\\k<ncode>/episodes/\\k<index>
- # ------------------------------------------------------------
- # 本文取得設定
- body_pattern: <div class="widget-episodeBody js-episode-body".*?>(?<body>.+?)</div>
- introduction_pattern: null
- postscript_pattern: null
- # ------------------------------------------------------------
- # 小説情報からパースするための設定
- novel_info_url: \\k<toc_url>
- # タイトル
- t: *title
- # novel_type 小説種別
- nt: '"serialStatus":"(?<novel_type>\w+)","publicEpisodeCount":(?<general_all_no>\d+),"totalCharacterCount":(?<length>\d+),"isCruel"'
- novel_type_string:
- RUNNING: 1
- COMPLETED: 3
- # general_all_no 掲載話数
- ga: null #'"publicEpisodeCount":(?<general_all_no>\d+),"totalCharacterCount":\d+,"isCruel":'
- # story あらすじ
- s: *story
- # general_firstup 初回掲載日
- gf: '"promotionalImageUrl":[^{}]*?,"publishedAt":"(?<general_firstup>[^"]+)",[^{}]*?"adminBookInformationUrl":'
- # novelupdated_at 小説の更新時刻。最終掲載日で代用
- nu: '"editedAt":"(?<novelupdated_at>[^"]+)"'
- # general_lastup 最新話掲載日
- gl: '"promotionalImageUrl":[^{}]*?,"lastEpisodePublishedAt":"(?<general_lastup>[^"]+)",[^{}]*?"adminBookInformationUrl":'
- # writer 作者名
- w: </h1><div><div[^>]*><div[^>]*><a href="/users/[^>]+>(?<writer>.+?)</a></div></div></div>
- # length 文字数
- l: null #'"totalCharacterCount":(?<length>\d+),"isCruel":'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement