Greasy Fork is available in English.

My Novel Reader

小说阅读脚本,统一阅读样式,内容去广告、修正拼音字、段落整理,自动下一页

< Feedback on My Novel Reader

سؤال / تعليق

§
Posted: 26-02-2017

请大大帮忙看看巫师图书馆的规则

RT,其他规则我已经写好了,但是书名规则不知道怎么写。

书名只有两个位置出现

<meta name="keywords" content="神圣巨龙成长史" />
        <div class="arthor"> 小说:神圣巨龙成长史       &nbsp;&nbsp;
          小说作者:<a href="/member/authorinfo/theId/13.html" class="authorLink">龙说</a>
          &nbsp;&nbsp;
          更新时间:2016-10-25 19:16:15          &nbsp;&nbsp;
          字数:4220 </div>

请大大帮忙写下书名规则吧,谢谢

附上我写的其他规则

    {siteName: "巫师图书馆.",
        url: "http://www\\.54tushu\\.com/book_library/chaptershow/theId/\\d+\\.html",
        //titleReg: "(.*?)-巫师图书馆",
        //titlePos: 0,
        bookTitleSelector: "meta#keywords",
        titleSelector: "div.title",
        prevSelector: "div.pageInfo a:first",
        nextSelector: "div.pageInfo a:last",
        indexSelector: "a[title='返回书页']",
        useiframe: true,
        timeout: 1000,
        contentSelector: "div#ChapterContent",
    },
ywzhaiqiمؤلف
§
Posted: 27-02-2017

由于 bookTitleSelector 不支持获取 content 内容,可用 contentPatch 补丁的方式

{siteName: "巫师图书馆.",
    url: "http://www\\.54tushu\\.com/book_library/chaptershow/theId/\\d+\\.html",
    bookTitleSelector: "#m-book-title",
    titleSelector: "div.title",
    prevSelector: "div.pageInfo a:first",
    nextSelector: "div.pageInfo a:last",
    indexSelector: "a[title='返回书页']",
    useiframe: true,
    timeout: 1000,
    contentSelector: "div#ChapterContent",
    contentPatch: function(fakeStub){
      var bookTitle = fakeStub.find('meta[name="keywords"]').attr('content');
      fakeStub.find('body').append('<div id="m-book-title">' + bookTitle + '</div>');
    }
},
§
Posted: 27-02-2017

谢谢y大,已经可以正常显示书名了

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.