Git Product home page Git Product logo

Comments (5)

AurelionSoldMe avatar AurelionSoldMe commented on July 18, 2024 1

10/10 just tested your rule now, way better than mine though gets caught by captcha every now and then still way faster.

No clue why my fast version would miss content or get hit by the 1 day timeout originally.

from fanfiction-manager.

gmastergreatee avatar gmastergreatee commented on July 18, 2024

Try this and tell if this better

{
    "guid": "c6f1562f-2f0a-441b-861c-9255b7192455",
    "rule_name": "LightNovelWorld.com",
    "url_regex": "(?:https://)*(?:www\\.)*(lightnovelworld).com/novel/",
    "pagetype_code": "// https://www.lightnovelworld.com/novel/doomsday-spiritual-artifact-master-1676/chapter-5\n// https://www.lightnovelworld.com/novel/doomsday-spiritual-artifact-master\n\nif (document.title.toLowerCase().includes('just a moment')) {\n  return -2;\n}\n\nreturn 0;",
    "toc_code": "injectJquery();\n\nif ($('#chapter-list-page').length) {\n  // means this is TOC page\n  return {\n    retry: 1,\n    nextURL: $('.booktitle').attr('href')\n  };\n}\n\nif ($('.booktitle').length) {\n  // means this is chapter page\n  return {\n    retry: 1,\n    nextURL: $('.booktitle').attr('href')\n  };\n}\n\n// only allow to go past if it is novel page\nif ($('.chapter-latest-container').length <= 0) {\n  throw Error('The page-type couldn\\'t be determined. Please re-check the URL.');\n}\n\n// compile list of chapters\nlet chListURL = $('.chapter-latest-container')[0].href;\nlet toc1 = await fetch(chListURL).then(x => x.text());\nlet tocPageCount = $(toc1).find('.pagination-container li').length - 1;\nlet tocs = [toc1];\nfor (let i = 1; i < tocPageCount; i++) {\n    tocs.push(await fetch(chListURL + '?page=' + (i + 1)).then(x => x.text()));\n}\nlet chapterURLs = [];\ntocs.forEach(x => {\n  chapterURLs.push(...Array.from($(x).find('li[data-chapterno] a')).map(x => x.href))\n});\n\nlet retMe = {\n  'CoverURL': $('.glass-background img')[0].src,\n  'Title': $('h1').text().trim(),\n  'Summary': Array.from($('.summary .content > p')).map(x => $(x).text().trim()).join('<br><br>'),\n  'ChapterCount': chapterURLs.length,\n  'ChapterURLs': chapterURLs,\n};\n\nreturn retMe;",
    "chapter_code": "injectJquery();\n\n$('#chapter-container > div').remove();\n\nlet retMe = [\n  {\n    \"title\": $('.chapter-title').text().trim().replace(/^chapter\\s+/gi, ''),\n    \"content\": $('#chapter-container').html(),\n    \"nextURL\": \"\"\n  },\n];\n\nreturn retMe;",
    "url_blocks": "fonts.google\n/content/\nvntsm.com\ncriteo.net\ninmobi.com\ngoogletagmanager\nstatic.lightnovelworld.com/lib/"
  },

from fanfiction-manager.

gmastergreatee avatar gmastergreatee commented on July 18, 2024

No need to wait 8 seconds or anything, most of the times the verification will be automatically bypassed. And if it doesn't for any reason, then just open Renderer and spam click the verification checkbox. I just downloaded 270 chapter novel without requiring to click anywhere.

from fanfiction-manager.

AurelionSoldMe avatar AurelionSoldMe commented on July 18, 2024

I think the hella long wait time was cause not sure if it still does considering they did switch up the description on me is that it only downloaded some part of the novel due to dynamic loading.

from fanfiction-manager.

gmastergreatee avatar gmastergreatee commented on July 18, 2024

ok thanks for reporting, added the rule in the rules.json file

from fanfiction-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.