title | //h2[contains(@class,'newsTitle')] |
---|---|
exampleUrl | https://news.yahoo.co.jp/pickup/6290183 |
url | ^https?://news\.yahoo\.co\.jp/pickup/ |
author | |
tag | |
pageElement | //p[contains(@class,'hbody')] |
subtitle | |
firstPageLink | //a[contains(@class,'newsLink')] |
nextLink | |
memo |
Database: ことせかいWebページ読み込み用情報
ことせかい という読み上げアプリで利用するデータです。
Webで読める小説を取り込むために、文書の場所や次のページへのlinkなどをさすxpathを記述します。
幾つかの項目はAutopagerizeとほぼ同じ意味です。
ことせかい については以下のURLを参照してください。
http://limura.github.io/NovelSpeaker/
以下、個々の属性についての概ねの方針を書いておきます。
url
対象のURLしてヒットする正規表現を書きます。
pageElement
読み上げ対象となる文字列が含まれるエレメントを取り出すxpathを書きます。複数hitするようなxpathを書いた場合、その全てが取り出されます。
nextLink
次のページに続く場合のaタグを指定するxpathを書きます。複数hitするものを書いた場合、最初のエレメントだけが採用されます。
Autopagerize側では必須属性になっていますが、こちらでは必須ではありません。つまり、Autopagerizeは(その目的から)1ページに全てが入っているサイトは登録されていませんので、そのようなサイトはこちらに登録する必要があります。また、Autopagerize側で主題が違う記事へのnextLinkが指定されているものについて、こちら側のデータベースにnextLinkが無い状態で登録することによって、主題が違う記事を読み込まないようにする事もできなくもありません。
title
本棚に登録される時の名前として採用される文字列を含むエレメントを取り出すためのxpathを書きます。
subtitle
(2017/12/18: 将来的に利用するための項目です)小説の個々の章にあたるサブタイトルを抽出できるエレメントを取り出すためのxpathを書きます。
author
作者名として採用される文字列を含むエレメントを指定するxpathを書きます。
firstPageLink
小説のタイトルページ(本文は含まない)がある場合、そのタイトルページから本文のページに遷移するためのaタグを指定します。複数hitするものを書いた場合、最初のエレメントだけが採用されます。
注意:firstPageLink にヒットした場合、そのURLを読み直して評価をし直すため、無限に firstPageLink の読み込み先を読んで場合があります。そのようにならないように firstPageLink の xpath を指定してください。
tag
その小説等に関する文字列タグが列挙されているエレメントがある場合は指定します。将来的に小説の検索などに使われるタグとして利用されるつもりのものになります。幾つかターゲットを書いてみたところ、どうやら Aレコード でタグへのlinkになっているものが多いようで、その場合は内部にスペースがあるタグなども見受けられましたため、Aレコードのようなエレメント毎に一つのタグとして取り込めないかな?と思っています。ということでできればAレコードそのものを取り出すように(a/text() のような XPath を書いてテキストだけにしないように)して頂ければ幸いです。
isNeedHeadless
JavaScriptが動作した後に本文部分(pageElement)が生成される場合には何らかの値("true"が推奨)を入れます。"false" や "False", "nil", "0", ""(何も入れない) の場合には単にGETリクエストで取得された値について評価して良いという意味になります。
nextButton
isNeedHeadless が有効になっている場合、ここで指定される要素の最初の物を次へのリンクとみなして .click() が実行されます。なお、この要素については xpath ではなく CSS selector で表記します(できればxpathにしたいのですが……)。なお、nextLink よりも nextButton の方が先に評価されます(nextButton と nextLink が両方共に存在する場合は nextButton が優先されます)。
firstPageButton
isNeedHeadless が有効になっている場合、ここで指定される要素の最初の物を最初の本文へのリンクとみなして .click() が実行されます。なお、この要素については xpath ではなく CSS selector で表記します(できればxpathにしたいのですが……)。なお、firstPageLink よりも firstPageButton の方が先に評価されます(firstPageButton と firstPageLink が両方共に存在する場合は firstPageButton が優先されます)。
forceClickButton
(実験的機能なので将来的に変更される可能性があります)isNeedHeadless が有効になっている場合、ここで指定される要素が存在した場合はその要素に対して .click() が実行された後、改めて内容を評価し直します。特定のボタンを押さないと先に進めない場合などに利用します。
waitSecondInHeadless
isNeedHeadless が有効になっている場合、ページが読み込まれたと思われる後、さらにここで指定される数値で指定される秒数待った後にinnerHTMLを評価します。
injectStyle
pageElement で取り出した後のHTMLに対して強制的に適用するstyleを記述します。これは、pageElementで取り出した後のHTMLにはstyleが適用されない(パスが違うのでstyleが適用されないであるとか、pageElementで取り出されたHTMLにはstyleが無いであるとか、styleは別のファイルになっているのでGETリクエスト一回では取り出せないであるといったときに、white-space:pre-wrap; で指定されるようなコンテンツが入っているとHTMLからStringに変換した時に改行周りとかが省略されてしまって悲しいことになるという問題を回避するための物になります。(例えば、pageElement として <div class="content xxx yyy">...</div> が取り出されるのがわかっている場合、"div.content{white-space:pre-wrap;}" といったような値を指定する事を期待しています。
exampleUrl
対象のURLを書きます。後で動作確認などをする時に利用します。複数書く場合は半角スペースで区切ってください。
memo
何らかのメモ書きを残すべきと思った場合は書いておいてください。日本語でOKです。
また、次のページや最初のページを判定するための要素がいくつかあるのでそれらの優先順位を別途書き記しておきます。
優先される順序は
1. forceClickButton
2. nextButton
3. firstPageButton
4. nextLink
5. firstPageLink
の順(数字が若い方が優先)になります。
なお、ことせかい の動作としては、このデータベースとAutopagerizeのデータベースの両方を使ってデータを読み込むように作られています。
動作としては対象のURLについて、まずこちらのデータベースにあるものが優先され、こちらのデータベースに載っていないURLのものについてはAutopagerizeのデータベースを参照することになります。
ですので、Autopagerize側で定義されている情報で十分なものの場合は改めてこちら側のデータベースに登録する必要は無いかもしれません。
Last Update: 2024-03-21T13:33:29+09:00 History
Item List
-
Yahoo news pickup 2018-07-18T04:08:15+09:00
last update: 2018-07-18T04:08:15+09:00
-
animate Times 2018-07-18T04:00:23+09:00
title //div[contains(@class,'headline')]/h2 exampleUrl https://www.animatetimes.com/news/details.php?id=1531800550 url ^https?://www\.animatetimes\.com/news/details.php author tag //div[contains(@class,'tag')]//li/a pageElement //div[contains(@class,'details')]/div[contains(@class,'entry')] subtitle firstPageLink nextLink //div[@class='next']/a memo last update: 2018-07-18T04:00:23+09:00
-
CNN.co.jp 2018-07-18T03:51:47+09:00
title //article/header//h1 exampleUrl https://www.cnn.co.jp/world/35122562.html url ^https?://www\.cnn\.co\.jp/[^/]*/ author tag //div/ul[contains(@class,'story-tag')]/li/a pageElement //article/div[contains(@id,'leaf-body')] subtitle firstPageLink nextLink //ul[contains(@class,'pagination')]/li/a[child::i] memo last update: 2018-07-18T03:51:47+09:00
-
togetter 2018-07-18T02:44:46+09:00
title //h1[contains(@itemprop,'headline')] pageElement //div[contains(@class,'tweet_box')]//p[contains(@class,'tweet') and child::span]/span/text()|//div[contains(@class,'tweet_box')]//p[contains(@class,'tweet')]/text()|//a[contains(@class,'user_link')]/strong|//div[contains(@class,'type_markdown')]|//div[@id='comment_box']/div[contains(@id,'comment_id_')]/div[contains(@class,'comment')]/div[@class='tweet'] subtitle //div[contains(@class,'list_description_box')] nextLink //link[@rel='next'] tag //span[contains(@class,'tag_box')]/a[not(contains(@data-hint,'タグを編集'))] url ^https?://togetter\.com/li/ exampleUrl https://togetter.com/li/1247681 author //div[contains(@class,'info_status')]/a[contains(@class,'user_icon')] last update: 2024-03-19T12:54:14+09:00
-
毎日新聞 2018-07-18T02:05:04+09:00
title //article//h1[@class='title-page'] pageElement //section[@id='articledetail-body']/*[not(self::div[contains(@class,'articledetail-image')]) and not(contains(@class,'ad-articledetail'))] tag //div[contains(@class,'articletag')]/ul[contains(@class,'articledetail-head-category-list')]/li/a[not(contains(@href,'/flash/'))] url ^https?://mainichi\.jp/([^/]*/)?articles/ exampleUrl https://mainichi.jp/articles/20180717/k00/00e/020/261000c last update: 2021-02-22T16:26:32+09:00
-
NHK 解説委員室 2018-07-18T01:58:02+09:00
title //div[contains(@class,'title')]/h3 exampleUrl http://www.nhk.or.jp/kaisetsu-blog/100/301682.html url ^https?://www\.nhk\.or\.jp/kaisetsu-blog/ author //p[contains(@class,'commentator')] tag //section[contains(@class,'keywordlist')]//ul[contains(@class,'keyword')]/li/a pageElement //article[contains(@class,'articleBox')]/div[contains(@class,'article')] subtitle firstPageLink nextLink memo last update: 2018-07-18T01:58:02+09:00
-
gamesindustry 2018-07-17T23:37:02+09:00
title //div[contains(@class,'article_news')]/h1 pageElement //div[contains(@class,'maintxt')]/text()|//div[contains(@class,'maintxt')]/*[not(self::h3[child::*[@class='HEADLINES_ANCHOR']]) and not(self::table[@class='img_center']) and not(self::table[@class='img_right_top']) and not(self::i[@class='def']) and not(self::h2[@class='emphasis']) and not(self::script) and not(contains(@class,'streaming_cotaner')) and not(contains(@class,'streaming_hd_contaner')) and not(self::noscript)] tag //aside[contains(@class,'keyword')]//li/a url ^https?://jp.gamesindustry.biz/article/ exampleUrl http://jp.gamesindustry.biz/article/1807/18071201/ author //div[contains(@class,'author')] last update: 2020-09-09T15:56:43+09:00
-
WIRED 2018-07-17T20:04:25+09:00
title //main//article//h1 pageElement //main//article//div[@class='body__inner-container']/*[self::p or self::h2] url ^https?://wired.jp/[0-9]*/[0-9]*/[0-9]*/ exampleUrl https://wired.jp/2018/07/17/sony-hidden-senses/ https://wired.jp/membership/2020/06/17/climate-change-alternative-meat/ author //main//article//header//span[@data-testid='BylineName'] last update: 2023-04-30T21:38:30+09:00
-
IGN Japan 2018-07-17T19:43:50+09:00
title //h1[contains(@id,'id_title')] exampleUrl http://jp.ign.com/rekidai-goty/26237/feature/goty2001 author //span[contains(@id,'id_author')] url ^https?://jp.ign.com/[^/]*/[0-9]*/ subtitle //h2[contains(@id,'id_deck')] pageElement //div[contains(@id,'id_text')]|//div[contains(@class,'review-bottom')] last update: 2019-06-24T18:06:16+09:00
-
価格.com ニュース 2018-07-17T19:37:59+09:00
title //div[contains(@id,'main')]/section[contains(@class,'news')]//h1 exampleUrl http://news.kakaku.com/prdnews/cd=pc/ctcd=0032/id=76049/ url ^https?://news.kakaku.com/prdnews/[^/]*/ctcd= author tag pageElement //div[contains(@id,'main')]/section[contains(@class,'news')]/p[not(contains(@class,'maker')) and not(contains(@class,'more'))] subtitle firstPageLink nextLink memo last update: 2018-07-17T19:37:59+09:00
-
Game Spark 2018-07-17T18:52:37+09:00
title //h1[contains(@class,'head')] exampleUrl https://www.gamespark.jp/article/2018/06/26/81878.html tag //h2[contains(@class,'group')] author //span[contains(@class,'writer-name')] url ^https?://www.gamespark.jp/article/ pageElement //article[contains(@class,'arti-body')] nextLink //div[contains(@class,'arti-pagination')]//li[contains(@class,'paging-next')]/a last update: 2018-07-17T19:04:31+09:00
-
PlayStation Blog 2018-07-17T18:46:38+09:00
title //div[contains(@class,'article-header')]//h1 exampleUrl https://www.jp.playstation.com/blog/detail/7142/20180626-lumines.html url ^https?://www.jp.playstation.com/blog/detail/ author //div[contains(@class,'article-header')]//a[preceding-sibling::span[1][contains(text(),'by')]] tag //article[contains(@class,'article-blog')]//a[contains(@class,'tag')] pageElement //article[contains(@class,'article-blog')] subtitle firstPageLink nextLink memo last update: 2018-07-17T18:46:38+09:00
-
VR Inside 2018-07-17T18:29:54+09:00
title //main/article//h1 exampleUrl https://vrinside.jp/news/post-139620/ tag //ul[contains(@id,'newsTag')] url ^https?://vrinside.jp/news/ pageElement //div[contains(@class,'newsContent')] last update: 2018-07-17T18:32:41+09:00
-
Gamer 2018-07-17T18:19:07+09:00
title //div[@class='titleBox']/h1/a/text() exampleUrl https://www.gamer.ne.jp/news/201807170019/ https://www.gamer.ne.jp/news/201807280008/ tag //div[contains(@class,'newsword')]/ul/li/a author //span[@class='newsWriter']/a url ^https?://www.gamer.ne.jp/news/ subtitle //div[@class='titleBox']/h1/a/span pageElement //article/div[contains(@class,'newsBody') or contains(@class,'newsDescription')]/*[not(self::div[contains(@class,'softBox')])] last update: 2018-08-24T13:21:45+09:00
-
ねとらぼ 2018-07-17T18:07:43+09:00
title //div[contains(@id,'cmsTitle')]//h1 pageElement //div[contains(@id,'cmsBody')]/div[@class='inner']/*[not(descendant::div[contains(@id,'google_ads_iframe')]) and not(descendant::img) and not(@id='notice') and not(@id='start') and not(@id='cmsCopyright') and not(self::script) and not(@class='endkwd') and not(contains(@id,'popIn_recommend')) and not(contains(@id,'googleAd')) and not(child::div[@id='endlinkConnection'])] subtitle //div[contains(@id,'cmsAbstract')]//h2 url ^https?://nlab.itmedia.co.jp/nl/articles/ exampleUrl http://nlab.itmedia.co.jp/nl/articles/1807/17/news070.html author //div[contains(@id,'byline')] last update: 2023-06-23T13:54:31+09:00
-
スラド 2018-07-17T16:38:20+09:00
title //h2[contains(@class,'story')]/span/a pageElement //section[contains(@id,'firehose')]//div[contains(@class,'body')]|//div[contains(@class,'title') and not( contains(@class,'hide'))]|//div[contains(@class,'commentBody')] subtitle //div[contains(@class,'details')] tag //span[contains(@class,'tags')]//span[contains(@class,'tag-bar')]/a[contains(@class,'tag')] url ^https?://[^.]+.srad.jp/story/ exampleUrl https://it.srad.jp/story/18/07/17/0424208/ author //div[contains(@class,'details')]/a last update: 2021-02-22T16:28:30+09:00
-
NHK NEWS WEB 2018-07-17T15:50:06+09:00
exampleUrl https://www3.nhk.or.jp/news/html/20180717/k10011536021000.html tag //ul[contains(@class,'nav-keywords')]/li/a title //h1[contains(@class,'content--title')] pageElement //div[contains(@class,'content--detail-body')]/*[not(self::nav)] url ^https?://www3.nhk.or.jp/news/html/ last update: 2019-10-13T18:52:00+09:00
-
朝日新聞 2018-07-17T15:46:52+09:00
title //div[contains(@class,'Title')]/h1|//main//h1 pageElement //div[contains(@class,'ArticleText')]/*[not(contains(@class,'ExtendedLinkMod')) and not(contains(@class,'AdMod'))]|//main/div/*[self::p or self::div[child::p]] url ^https?://(www|digital).asahi.com/articles/ exampleUrl https://www.asahi.com/articles/ASL7K3C32L7KUHBI00L.html https://www.asahi.com/articles/ASP535DR1P53TIPE009.html author //div[contains(@class,'Title')]/p[contains(@class,'Sub')]|//main/div[1]/div[1]/span[1] last update: 2023-02-24T20:11:56+09:00
-
impress * Watch 2018-07-17T15:42:44+09:00
title //div[contains(@class,'hdg-article')]/h1 pageElement //div[contains(@class,'contents-section') and not(parent::div[contains(@class,'contents-section')])]/*[not(contains(@class,'table-wrap')) and not(contains(@class,'image-wrap')) and not(contains(@class,'relatedLinks'))] subtitle //div[contains(@class,'hdg-article')]/h2 url ^https?://[^.]*.watch.impress.co.jp/docs/ exampleUrl https://game.watch.impress.co.jp/docs/topic/special/1131305.html author //ul[contains(@class,'author')]/li last update: 2021-12-16T09:18:25+09:00
-
iNSIDE 2018-07-17T15:37:36+09:00
title //h1[contains(@class,'head')] exampleUrl https://www.inside-games.jp/article/2016/05/13/98604.html url ^https?://www.inside-games.jp/article/ author //span[contains(@class,'writer-name')] pageElement //article[contains(@class,'arti-body')] subtitle firstPageLink nextLink memo last update: 2018-07-17T15:37:36+09:00
-
SCP-JP 2018-07-12T22:24:50+09:00
title //div[contains(@id,'page-title')] pageElement //div[@id='page-content']/*[not(contains(@class,'scp-image-block')) and not(child::div[@class='page-rate-widget-box']) and not(self::div[@class='info-container']) and not(self::div[@id='u-credit-view']) and not(self::div[@class='creditRate'])] tag //div[contains(@class,'page-tags')]/span/a url ^https?://(ja\.scp-wiki\.net|scp-jp\.wikidot\.com)/[a-z]+- exampleUrl http://ja.scp-wiki.net/scp-444-jp last update: 2021-12-18T01:19:31+09:00
-
ファミ通.com/news 2018-05-28T08:51:44+09:00
title //h1[@class='article-header__heading'] pageElement //div[@class='article-body'] nextButton li.ft-pager__item--next a memo mobile からのアクセスだと nextLink の a が JavaScript で制御されてて拾えない isNeedHeadless true url ^https?://(www|s).famitsu.com/news/ exampleUrl https://www.famitsu.com/news/201805/24157448.html author //a[@class='article-header__author-name'] last update: 2020-08-08T19:08:28+09:00
-
novelva 2018-04-24T16:44:55+09:00
title //p[contains(@class,"title")] pageElement //div[contains(@class,"detail")] subtitle //h1[contains(@class,"episode")] firstPageLink //ul[contains(@class,"episode_list")]//a memo isNeedHeadless を true にしなかった場合、何故か が   (";" が無い) として取得されるので、一時的に isNeedHeadless を true にします。 isNeedHeadless true nextLink //a[contains(@class,"next_episode")] tag //ul[contains(@class,'keyword_list')]/li/a url ^https://novelba.com/(major/|indies/)?works/\d+ exampleUrl https://novelba.com/works/717926/episodes/7206321 author //p[contains(@class,"author")] last update: 2021-05-24T20:14:48+09:00
-
自衛隊イラク日報 バグダッド日誌/バスラ日誌 一覧 from akiyan.com 2018-04-18T20:16:43+09:00
title //a[@href="/"] exampleUrl https://jgsdf-iraq-dairy.akiyan.org/050928/16 url ^https://jgsdf-iraq-dairy.akiyan.org/ author pageElement //div[contains(@class, "blog-post")]/p[not(contains(@class,"blog-post-title")) and not(contains(@class,"blog-post-meta"))] subtitle //h2[contains(@class,"blog-post-title")] firstPageLink //h2[contains(@class,"blog-post-title")]/a nextLink //a[contains(text(),"次へ")] memo last update: 2018-04-18T20:16:43+09:00
-
科学の方法(macroscope.world.coocan.jp) 2018-03-21T23:52:07+09:00
title //body/div exampleUrl http://macroscope.world.coocan.jp/ja/work/digital_text/nakaya/hoho/index.html url ^http://macroscope.world.coocan.jp/ja/work/digital_text/nakaya/hoho/* author pageElement //body subtitle firstPageLink //a[contains(text(),"序")] nextLink //a[contains(text(),"章へ")] memo last update: 2018-03-21T23:52:07+09:00
-
カクヨム 2017-11-27T23:19:11+09:00
title //header//h1/a/span[@itemprop='name'] pageElement //div[contains(@class,'widget-episodeBody')]|//p[contains(@class,'widget-episodeTitle')] subtitle //p[contains(@class,'widget-episodeTitle')] firstPageLink //main//a[child::span and contains(@href,'/episodes/')]|//div[@id='app']//div[contains(@class,'WorkTocSection_episode')]/a[contains(@class,'WorkTocSection_link') and contains(@href,'/episodes/')]|//a[contains(@href,'/works/') and contains(@class,'WorkTocSection_link')] memo 小説家になろうの取り込み設定に似せてpageElementにサブタイトルを含むように変更させていただきました。 nextLink //div[@id='contentMain-nextEpisode']/a tag //a[contains(@href,'/tags/')] url ^https://kakuyomu\.jp/(works|publication/entry)/\d+ exampleUrl https://kakuyomu.jp/works/1177354054884506853/episodes/1177354054884506867 author //p[@id='contentMain-header-author'] last update: 2024-01-04T11:44:17+09:00
-
ノクターンノベルス 2017-11-27T23:10:47+09:00
title //div[@class='contents1']/a[not(@href='https://syosetu.com')][1]|//div[@id='novel_contents']//p[contains(@class,'novel_title')] pageElement //div[@id='novel_honbun']|//p[contains(@class,'novel_subtitle')]|//div[@id='novel_no'] subtitle //p[contains(@class,'novel_subtitle')] firstPageLink //div[@id='container']//div[@id='novelindex_button']/a|//div[@id='novel_contents']//div[@class='index_box']/dl/dd/a[contains(@href,'/1/')] memo 恐らくDOM構造は同じなので小説家になろう側でnovel18も一緒に定義するようにします。 http://wedata.net/items/81619 nextLink //div[@class='novel_bn'][1]/a[contains(., '次へ')] tag //th[text()='キーワード']/following-sibling::td url ^https://novel18\.syosetu\.com/ exampleUrl https://novel18.syosetu.com/n0643cq/1/ author //table[@id='noveltable1']//tr[child::th[text()='作者名']]/td|//div[@class='novel_writername' and not(child::a)]|//div[@class='novel_writername']/a|//body[not(descendant::div[@class='novel_writername'])]//div[@class='contents1']/a[contains(@href,'mypage.syosetu.com')]/text()|//body[not(descendant::div[@class='novel_writername'])]//div[@class='contents1' and not(child::a[contains(@href,'mypage.syosetu.com')])]/text() last update: 2024-03-07T14:14:11+09:00
-
ハーメルン 2017-11-26T09:15:04+09:00
title //div[@id='maind']/div/p/span/a[@href='./']|//h1[@id='pagetitle']/a pageElement //div[@id='honbun'] subtitle //div[@id='maind']/div[@class='ss']/span firstPageLink //td/span[@id='1']/following-sibling::a[1]|//ul[contains(@class,'entry')]/li/a nextLink //div[@id='maind']/div/p/a[contains(text(),'次の話')]|//div[contains(@class,'novelnavi')]/ul/li[contains(@class,'novelnb')]/a[contains(text(),'次の話')] tag //div[contains(@class,'ss')]/a[contains(@href,'//syosetu.org/search/?mode=search&word=')] url https?://syosetu\.org/novel/\d+/ exampleUrl https://syosetu.org/novel/92490/ https://syosetu.org/novel/92490/1.html author //div[@id='maind']//p[child::span/a[@href='./']]/a[contains(@href,'/user/')] last update: 2022-11-01T16:50:32+09:00
-
シバ山ブログ 2017-11-23T16:51:34+09:00
title //h1[contains(@class,'entry-title')] exampleUrl http://shibayamablog.net/game/reviews/20347/ tag //span[contains(@class,'post-tag')]/a author //span[contains(@class,'post-author')]/span/a url ^https?://shibayamablog\.net/[^/]*/[^/]*/ pageElement //div[@id='the-content']/*[not(self::script) and not(self::p/noscript)] last update: 2018-07-22T19:40:00+09:00
-
はてなブログ 2017-11-23T16:44:34+09:00
title //h1[contains(@class,'entry-title')] pageElement //div[contains(@class,'entry-content')] tag //div[contains(@class,'entry-categories')]/a url ^https?://[^.]+\.hatenablog\.(com|jp)/entry/ exampleUrl http://arcadia11.hatenablog.com/entry/2017/11/19/232902 author //div[contains(@class,'hatena-module-body')]//a[contains(@class,'hatena-id-link')] last update: 2021-06-19T19:05:15+09:00
-
はてな匿名ダイアリー 2017-11-23T16:38:28+09:00
title //div[contains(@class,'section')]/h3 exampleUrl https://anond.hatelabo.jp/20171122184237 url ^https://anond\.hatelabo\.jp/ pageElement //div[contains(@class,'body')]/div[contains(@class,'section')]/*[not(contains(@class,'share-button')) and not(contains(@class,'sectionfooter'))] last update: 2018-08-01T21:01:48+09:00
-
ITmedia 2017-11-23T16:28:18+09:00
title //div[@id='cmsTitle']//h1[@class='title']/span[@class='title__maintext'] pageElement //div[@id='cmsBody']/div[contains(@class,'inner')]/*[not(self::div[@id='notice']) and not(self::script) and not(self::div[@id='masterSocialbuttonTop']) and not(child::script) and not(self::div[contains(@class,'endlink')]) and not(self::div[@id='start']) and not(self::div[@id='tmplCopyright']) and not(self::div[@id='caseStudyRanking']) and not(self::div[@id='cmsSeriesList']) and not(self::div[@id='masterSocialbuttonBtm']) and not(self::div[@class='ctrl']) and not(@id='cmsCopyright') and not(@id='snsSharebox') and not(@id='ulCommentWidget') and not(@id='ulCommentWidgetAnnounce') and not(@id='body_insert_ad') and not(@rel='stylesheet')]|//div[@id='masterBody']//div[@id='masterMain']//article[@id='cmsWrap']//div[@id='cmsBody']//div[@id='cmsBodyMain']/*[not(self::div[@id='notice']) and not(self::script) and not(self::div[@id='masterSocialbuttonTop']) and not(child::script) and not(self::div[contains(@class,'endlink')]) and not(self::div[@id='start']) and not(self::div[@id='tmplCopyright']) and not(self::div[@id='caseStudyRanking']) and not(self::div[@id='cmsSeriesList']) and not(self::div[@id='masterSocialbuttonBtm']) and not(self::div[@class='ctrl']) and not(@id='cmsCopyright') and not(@id='snsSharebox') and not(@id='ulCommentWidget') and not(@id='ulCommentWidgetAnnounce') and not(@id='body_insert_ad') and not(@rel='stylesheet') and not(descendant::img)] nextLink //div[contains(@class,'ctrl')]/span[@id='next']/a|//div[@id='cmsSeriesList']//article[contains(@class,'colBoxIndex') and following-sibling::article[contains(@class,'mycolBoxIndex')]][last()]//h1/a[contains(@href,'/articles/') or contains(@href,'/spv/')] url ^https?://www\.itmedia\.co\.jp/[^/]+/articles/ exampleUrl http://www.itmedia.co.jp/pcuser/articles/1711/23/news016.html author //div[@id='cmsByline' or @id='cmsInfo']/*[@id='byline']/a last update: 2022-06-22T13:18:29+09:00
-
GameCast 2017-11-23T16:14:51+09:00
title //div[contains(@class,'entry')]/h3/a exampleUrl http://www.gamecast-blog.com/archives/65906626.html tag //dl[contains(@class,'entryTag')]/dd/a url ^https?://www\.gamecast-blog\.com/archives/ pageElement //div[contains(@class,'entryBody')] memo ライターがある記事もあるんだけれどちょっとxpath的には書けなそう(´・ω・`) last update: 2018-07-19T16:38:26+09:00
-
もぐらゲームス 2017-11-23T16:09:43+09:00
title //h1[contains(@class,'entry-title')] pageElement //section[contains(@class,'entry-content')]/*[not(self::img) and not(self::noscript) and not(self::script) and not(self::ins)] tag //ul[contains(@class,'post-categories')]/li/a url ^https?://www\.moguragames\.com/entry/ exampleUrl http://www.moguragames.com/entry/sgb-exporter-for-unity-announcement/ author //div[contains(@class,'info')]/div[contains(@class,'name')] last update: 2021-09-11T16:48:47+09:00
-
doope! 2017-11-23T16:05:24+09:00
title //div[contains(@class,'cont_titbox')]/h2 pageElement //div[contains(@class,'cont_article clearfix')]/*[not(@class='at_adwbox') and not(@class='cont_via') and not(@class='cont_related') and not(@class='articleimg')] url ^https://doope\.jp/ exampleUrl https://doope.jp/2017/1171586.html https://doope.jp/2021/12122063.html author //div[contains(@class,'cont_footbox_03')]/a last update: 2023-06-29T12:52:56+09:00
-
AUTOMATON 2017-11-23T16:01:34+09:00
title //h1[contains(@class,'entry-title')] pageElement //div[contains(@class,'td-post-content')]//*[self::p or self::h1 or self::h2 or self::h3 or self::h4 or self::ul] nextLink //footer/div[contains(@class,'page-nav')]/a[div/i[contains(@class,'td-icon-menu-right')]] url ^https?://(jp\.)?automaton-media\.com/(articles|devlog)/ exampleUrl http://jp.automaton.am/articles/newsjp/20171122-58146/ https://jp.automaton.am/devlog/interview/20180807-73719/ author //div[contains(@class,'td-post-author-name')]/a last update: 2023-09-22T16:38:36+09:00
-
電ファミニコゲーマー 2017-11-23T15:53:45+09:00
title //div[@id='articleHeader']/h1 pageElement //div[@id='articleBody']/*[not(descendant::noscript) and not(descendant::script) and not(aside[contains(@class,'steam')]) and self::p or self::h2 or self::blockquote[child::p]] nextLink //div[@class='page-num' or @class='pagerInner']/span/following-sibling::a tag //div[contains(@id,'postTags')]/ul/li/a url ^https?://news\.denfaminicogamer\.jp/ exampleUrl http://news.denfaminicogamer.jp/kikakuthetower/171122 author //div[contains(@class, 'entry-profile-icon-textheader')] last update: 2023-12-26T15:03:51+09:00
-
pixiv小説 2017-11-20T16:19:11+09:00
waitSecondInHeadless 2.0 title //main/section//h1[not(preceding::div[child::a[contains(@href,'/series/')]])]|//div[@class='title-scroller']|//main/section//div[following::h1]/a[contains(@href,'/series/')] pageElement //main/div/p|//section[@id='novel-text-container']|//section/div/div/div[child::h1]//p[@id]|//div[@class='novel-details-view']//div[contains(@class,'comment-text') and contains(@class,'f-caption-s')] forceClickButton main div.charcoal-token > div > div > div > div > button, #wrapper #contents #spa-contents > div > div.novel-details-view > div.swipe-detector > div > div > .button-link nextButton div[direction="next"] button, nav.novel-pager-container span:nth-child(3):not(.invisible) subtitle //main/section//main//h2 firstPageButton div#spa-contents div.novel-details-view .navigation-container button:not(button[disabled=disabled]) firstPageLink //main/section//div[preceding-sibling::nav]//a[contains(@href,'/novel/show.php?id=')]|//div[@id='spa-contents']//div[@class='works-grid-list']//div[contains(@class,'list-item') and contains(@class,'is-list')]//a[contains(@href,'/novel/show.php?') and @class='novel-title'] overrideUserAgent Mozilla/5.0 (Mac OS X) AppleWebKit (KHTML, like Gecko) memo pixiv小説の個々の小説は通常(?)とはちょっと違う形でカテゴライズされているため、かなりややこしい SiteInfo になっているため、メモを残す。 まず、isNeedHeadless は true である必要がある。これは本文がHTML上に現れるためには JavaScript が動作する必要があるためである。 次に、pixiv小説におけるページは「>次へ」といった感じのボタン(<a> ではないのでJavaScriptで .click() する必要がある)を押してめくるのであるが、この時URLは変化しない(正確に言うと # より後ろの部分が変化する)。 そのため、まず最初に検索すべきはこの「>次へ」のボタンである。 これは nextButton に CSS selector を書く事によって行う。 このボタンが確認できるのは例えばこのURLである。 https://www.pixiv.net/novel/show.php?id=8919908#3 次に、「>次へ」といったボタンで手繰って行った後に開くべきページについて。 pixiv小説は「シリーズ」という物で続きの話が投稿される場合がある。 このシリーズの次の話を手繰るのは <a> で行けそうであるので nextLink を用いる(余談だがシリーズの次の話はIDが異なる。どうやらそれぞれの小説は個々に独立していて、シリーズとして関連性を与えているという概念らしい)。 このシリーズの次の話へのリンクが確認できるのは例えばこのURLである。 https://www.pixiv.net/novel/show.php?id=13381749 この中の、「#41 強くてニューゲームは都市伝説。上手に「待て」が出来るかな?」というボタンがそれである。 次に、firstPageLink と firstPageButton について。 pixiv小説では個々の小説のタイトルページ(表紙?)も存在する。 これは例えば https://www.pixiv.net/novel/show.php?id=8919908 といった物がそれに当たるのであるが、これはブラウザで開くと勝手に最初のページを開くような動作を取ることがあるため、この挙動に当たってしまうとタイトルページの解析はできない。 また、シリーズの一覧ページというものもあり、こちらは例えばこのURL https://www.pixiv.net/novel/series/1270584 で確認できる。 このシリーズ一覧での最初の小説へのリンクについては firstPageButton で対応する。 なお、pixiv小説はスマホのような狭い画面とPCのような広い画面でHTMLのDOM構造が大きく異るタイプであるので、どちらの側でも動作するような値を指定する必要がある事を注記しておく。(Chromeのdevtoolでクライアントを変えてリロードすればそれぞれのDOM構造を確認できるはずである) isNeedHeadless true nextLink //div[@id='spa-contents']//div[contains(@class,'series-navigation')]/div[@class='navigation-container']/a[contains(@href,'/novel/show.php?') and contains(@class,'gtm-novel-work-series-next')]|//a[contains(@href,'/novel/show.php?') and contains(@class,'gtm-novel-work-series-next')] tag //main/section//footer//li//a[contains(@href,'/tags/')]|//div[@id='spa-contents']//div[@class='novel-details-view']//div[contains(@class,'display-tags')]/span[following-sibling::div[@class='tags-editor']]/a[contains(@href,'/tags/')] url ^https://(www|touch)\.pixiv\.net/novel/(show\.php|series/\d+) exampleUrl https://www.pixiv.net/novel/show.php?id=8919908#1 injectStyle main {white-space:pre-wrap;} p.novel-paragraph{white-space:pre-wrap;} author //div[contains(@class,'user-details-card')]/a[contains(@href,'/users/') and @class='user-details-name']|//main/section//h2//div[preceding-sibling::a]/a[contains(@href,'/users/')] last update: 2023-10-07T12:59:58+09:00
-
FC2小説 2017-11-20T16:10:53+09:00
title //div[contains(@class,'content_title')] exampleUrl https://novel.fc2.com/novel.php?mode=tc&nid=208887 https://novel.fc2.com/novel.php?mode=rd&nid=208887&pg=1 url ^https://novel\.fc2\.com/novel\.php author //p[contains(@class,'username')]/a pageElement //div[@class='novel_body'] firstPageLink //li[contains(@class,'novel_first')]/a nextLink //li[@class='right']/a memo last update: 2017-11-20T16:10:53+09:00
-
エブリスタ 2017-11-20T16:04:06+09:00
title //title exampleUrl https://estar.jp/_work_viewer?p=1&page=1&w=24836818&ws=0 tag //div[contains(@class,'body')]/div[contains(@class,'tags')]/a[contains(@class,'tag')] author //div[contains(@class,'info')]//a[contains(@class,'nickname')] url ^https?://[^/]*\.?estar\.jp/_work_viewer subtitle //h1[contains(@class,'subject')] pageElement //div[@class="m-viewer__body"] firstPageLink //div[contains(@class,'episodeList')]/div/a[contains(@class,'link')] nextLink //a[contains(@class, 'js-viewer__nextPageUrl')] last update: 2019-06-12T15:02:48+09:00
-
note 2017-11-20T11:30:24+09:00
waitSecondInHeadless 4 title //h1[contains(@class,'o-noteContentHeader__title')] pageElement //div[contains(@data-name,'body')]/*[not(self::figure and not(child::blockquote)) and not(child::img) and not(self::nav[contains(@class,'o-indexHeading')])] scrollTo //article//div[contains(@class,'a-loadingDots')] firstPageLink //div[contains(@class,'p-cardItem')]/content-link/a[@data-content-link='true'] isNeedHeadless true nextLink //a[contains(@class,'o-siblingNote__link--next')] tag //div[contains(@class,'a-tag__label')] url (^https://note.(mu|com)/[^/]+|^https://[^/]+/n/n[a-f0-9]{12}$) exampleUrl https://note.mu/ruiu/n/n89d18450b1bb author //div[contains(@class,'o-noteContentHeader__name')]|//h1[contains(@class,'renewal-p-creator__name')] last update: 2023-10-08T22:56:52+09:00
-
星空文庫 2017-11-20T11:30:24+09:00
title //article/header/h1 pageElement //section[contains(@id,'chapter')] tag //div[@id='outline']/ul/li url ^https://slib\.net/ exampleUrl https://slib.net/79045 author //article/header/p last update: 2020-08-23T12:09:10+09:00
-
青空文庫(XHTML) 2017-11-20T11:30:24+09:00
title //h1[@class='title']|//h2[@class='subtitle'] pageElement //div[@class='main_text'] firstPageLink //a[contains(text(),'いますぐXHTML版で読む')] url ^https?://www\.aozora\.gr\.jp/cards/\d+/(card\d+\.html|files/\d+_\d+\.html) exampleUrl http://www.aozora.gr.jp/cards/001779/files/57228_58735.html author //h2[@class='author'] last update: 2023-02-20T09:51:58+09:00
-
アルファポリス 2017-11-20T11:27:02+09:00
title //h1[@class='title'] pageElement //div[@id='novelBody'] forceClickButton div[id="TopLayer"] subtitle //h2[contains(@class,'episode-title')]|//div[@class='text-body-story-chapter' or @class='text-body-story-title'] firstPageLink //div[contains(@class,'episodes')]/div[contains(@class, 'episode')]/a|//div[contains(@class,'episodes')]/div[contains(@class, 'rental')]/div[@class='rental-episode']/a[contains(@href,'/episode/')] isNeedHeadless true nextLink //a[contains(@class, 'next')]|//div[@class='navi-next']/a[contains(@href,'/episode/') and contains(@href,'/novel/')] tag //div[contains(@class,'content-tags')]/span/a url ^https://www.alphapolis.co.jp/novel/ exampleUrl https://www.alphapolis.co.jp/novel/455162801/240128356 author //h2[@class='author']/a last update: 2023-12-28T17:17:10+09:00
-
コンプリート・シャーロック・ホームズ 2017-11-20T11:27:02+09:00
title //title pageElement //div[@class='JaInnerPage']/p firstPageLink //tr[@class="IndexRow"][1]//div/a nextLink //td[@class='RightIndexBar']/a[contains(substring-after(@href,'../'),'/')] url ^https?://www.221b.jp/ exampleUrl http://www.221b.jp/1-stud.html http://www.221b.jp/h/stud-101.html last update: 2020-11-22T03:50:56+09:00
-
小説家になろう 2017-11-20T11:27:02+09:00
title //div[@class='contents1']/a[not(@href='https://syosetu.com')][1]|//div[@id='novel_contents']//p[contains(@class,'novel_title')]|//div[@id='novel_contents']//div[@class='novel_title'] pageElement //div[@id='novel_honbun']|//p[contains(@class,'novel_subtitle')]|//div[@class='novel_subtitle']|//div[@id='novel_p']|//div[@id='novel_a'] subtitle //p[contains(@class,'novel_subtitle')]|//div[@class='novel_subtitle']/text() firstPageLink //div[@id='container']//div[@id='novelindex_button']/a|//div[@id='novel_contents']//div[contains(@class,'novel_sublist')]/ul/li/a[contains(@href,'/n')][1]|//div[@id='novel_contents']//div[@class='index_box']/dl/dd/a[contains(@href,'/n')][1] isNeedHeadless true nextLink //div[@class='novel_bn'][1]//a[@rel='next' or @class='novelview_pager-next'] tag //th[text()='キーワード']/following-sibling::td url ^https?://(ncode|novel18)\.syosetu\.com/ exampleUrl https://ncode.syosetu.com/n2251cd/29/ https://ncode.syosetu.com/n2251cd/ author //table[@id='noveltable1']//tr[child::th[text()='作者名']]/td|//div[@class='novel_writername' and not(child::a)]|//div[@class='novel_writername']/a|//body[not(descendant::div[@class='novel_writername'])]//div[@class='contents1']//a[contains(@href,'mypage.syosetu.com')]/text() last update: 2024-03-15T09:32:34+09:00
-
暁 2017-11-20T11:27:02+09:00
title //h1 exampleUrl https://www.akatsuki-novels.com/stories/view/93548/novel_id~8688 https://www.akatsuki-novels.com/stories/index/novel_id~8688 tag //div[contains(@class,'body-normal')]//strong/a author //a[contains(@href, '/users/view/')] url ^https?://www\.akatsuki-novels\.com/stories/ subtitle //h2 pageElement //div[@class='body-novel'] firstPageLink //table[@class="list"]/descendant::a[1] nextLink //span[@class='next']/a last update: 2019-06-12T14:49:20+09:00
-
Arcadia 2017-11-20T11:27:02+09:00
title //title exampleUrl http://www.mai-net.net/bbs/sst/sst.php?act=dump&cate=original&all=24734 url ^https?://www\.mai-net\.net/bbs/sst/sst.php pageElement //blockquote/div nextLink //table[@class='brdr']//a[contains(., '次を表示する')] last update: 2017-11-20T17:02:04+09:00