Giter VIP home page Giter VIP logo

lightnovel-crawler's Introduction

Lightnovel Crawler

PyPI version download win download linux Discord
GitHub branch checks state AppVeyor Python version License GitHub stars

An app to download novels from online sources and generate e-books.

Discord: https://discord.gg/wMECG2Q

Telegram: https://t.me/epub_smelter_bot

Table of contents

Installation

This application uses Calibre to convert ebooks.
Install it from https://calibre-ebook.com/download
Without it, you will only get output in epub, text, and web formats.

Standalone Bundle (Windows, Linux)

Windows: lncrawl.exe ~ 25MB

In Windows 8, 10 or later versions, it might say that lncrawl.exe is not safe to dowload or execute. You should bypass/ignore this security check to execute this program.

Linux: lncrawl ~ 30MB

It is recommended to install via pip if you are on Linux

To get older versions visit the Releases page

PIP (Windows, Mac, and Linux)

📦 A python package named lightnovel-crawler is available at pypi.

Make sure you have installed Python v3.6 or higher and have pip enabled. Visit these links to install python with pip in Windows, Linux and MacOS. Feel free to ask on the Discord server if you are stuck.

To install this app or to update installed one via pip, just run:

$ pip install --user -U lightnovel-crawler

In some cases you have to use python3 -m pip or pip3 or python -m pip. And you do not need --user option, if you are running from root.

Next, open your terminal and enter:

$ lightnovel-crawler

# Or, a shortcut:
$ lncrawl

To view extra logs, use: lncrawl -lll

Termux (Android)

There is no official support to run python in mobile devices. It is not guaranteed that the app will run smoothly in all devices. It is recommended to use the bots on either Discord or Telegram if you are on mobile.

📱 Using Termux, you can run this app in your android phones too. Follow this instructions:

  • Install Termux from playstore.
  • Open the app and run these commands one by one:
    • apt update && apt upgrade
    • termux-setup-storage
    • pkg install ndk-sysroot make python zlib clang
    • pkg install libxml2 libxslt libiconv libcrypt libffi zlib libjpeg-turbo
    • pip install -U lightnovel-crawler to install the latest version of this app.
  • Now exit the console and relaunch it.
  • Type cd ~/storage/downloads to store novels there.
  • Type lncrawl to start.
  • You can navigate up using Volume UP + W and down using Volume UP + S.

When there is a new update available, you can install it just by running pip install -U lightnovel-crawler. You will not have to run all the above commands again.

Chatbots

Discord

Join our server: https://discord.gg/7A5Hktx

Or, visit this link to install discord bot to your own server: https://discordapp.com/oauth2/authorize?client_id=537526751170002946&permissions=51264&scope=bot

Telegram

Visit this link to get started with the telegram bot: https://t.me/epub_smelter_bot

Send !help to open the bot help message.

Heroku Deployment

Simply fill out the environment variables and you get a running instance.

Deploy

Running from source

  • First clone the repository:
$ git clone https://github.com/dipu-bd/lightnovel-crawler
  • Open command prompt inside of the project folder and install requirements:
$ pip install --user -r requirements.txt
  • Run the program (use python v3.6 or higher):
$ python __main__.py

# Or, in short,
$ python .

Running the Bots

There are two chatbots available at this moment: Telegram and Discord. To run your own bot server, follow these instructions:

  • Clone this repository
$ git clone https://github.com/dipu-bd/lightnovel-crawler
$ pip3 install --user -r requirements.txt
$ pip3 install --user -r requirements-dev.txt
  • Copy .env.example file to .env file. Edit this file and give your API credentials here.

  • To run the discord bot:

$ python3 . --bot discord --shard-id 0 --shard-count 1
  • To run the telegram bot
$ python3 . --bot telegram

There is a start.sh script to run a bot in ubuntu servers. It will basically execute the python __main__.py and send the task to run in background. I use it to run my discord bot in the server.

General Usage

Available options

$ lncrawl -h
================================================================================
                           📒 Lightnovel Crawler 🍀2.26.0 
                  https://github.com/dipu-bd/lightnovel-crawler 
--------------------------------------------------------------------------------
usage: lncrawl [options...]
       lightnovel-crawler [options...]

optional arguments:
  -h, --help            show this help message and exit

  -v, --version         show program's version number and exit
  -l                    Set log levels. (-l = warn, -ll = info, -lll = debug).
  --list-sources        Display a list of available sources.
  -s URL, --source URL  Profile page url of the novel.
  -q STR, --query STR   Novel query followed by list of source sites.
  -x [REGEX], --sources [REGEX]
                        Filter out the sources to search for novels.
  --login USER PASSWD   User name/email address and password for login.
  --format E [E ...]    Define which formats to output. Default: all.
  --add-source-url      Add source url at the end of each chapter.
  --single              Put everything in a single book.
  --multi               Build separate books by volumes.
  -o PATH, --output PATH
                        Path where the downloads to be stored.
  --filename NAME       Set the output file name
  --filename-only       Skip appending chapter range with file name
  -f, --force           Force replace any existing folder.
  -i, --ignore          Ignore any existing folder (do not replace).
  --all                 Download all chapters.
  --first [COUNT]       Download first few chapters (default: 10).
  --last [COUNT]        Download last few chapters (default: 10).
  --page START STOP.    The start and final chapter urls.
  --range FROM TO.      The start and final chapter indexes.
  --volumes [N [N ...]]
                        The list of volume numbers to download.
  --chapters [URL [URL ...]]
                        A list of specific chapter urls.
  --bot {console,telegram,discord,test}
                        Select a bot. Default: console.
  --shard-id [SHARD_ID]
                        Discord bot shard id (default: 0)
  --shard-count [SHARD_COUNT]
                        Discord bot shard counts (default: 1)
  --suppress            Suppress all input prompts and use defaults.
  --resume [NAME/URL]   Resume download of a novel containing in *****************
  ENV                   [chatbots only] Pass query string at the end of all options. It will be use instead of .env
                        file. Sample: "BOT=discord&DISCORD_TOKEN=***&LOG_LEVEL=DEBUG"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example Usage

Open your console and type lncrawl --version first to check if you have installed it properly. Here are some example usage of the app:

  • To start an interactive session: lncrawl

  • To download using an url: lncrawl -s https://boxnovel.com/novel/reincarnation-of-the-strongest-sword-god/

  • To search novels: lncrawl -q "Strongest Sword God"

  • To search novels from selected sources: lncrawl -q "Strongest Sword God" --sources

  • To download all chapters: lncrawl --all

  • To download first 25 chapters: lncrawl --first 25

  • To download all between two chapters: lncrawl --range 10 30

  • To download all between two chapter links: lncrawl https://boxnovel.com/novel/reincarnation-of-the-strongest-sword-god/chapter-2205 https://boxnovel.com/novel/reincarnation-of-the-strongest-sword-god/chapter-2211

  • To download a specific volumes: lncrawl --volumes 2 3

  • To define output path: lncrawl -o "D:\Lightnovels\reincarnation-of-the-strongest-sword-god"

  • To delete the output folder if exists: lncrawl -f

  • To ignore the output folder if exists: lncrawl -i

  • To resume download where is has been left previously: lncrawl -i

  • To specify output formats: lncrawl --format epub pdf mobi

  • To display list of supported sources: lncrawl ---list-sources

  • If you provide an option in the argument, it will skip it in the interactive session. If you want to disable all interactive prompts, pass --suppress at the end.

  • You can stack up options like this: lncrawl -s https://boxnovel.com/novel/reincarnation-of-the-strongest-sword-god/ -o "D:\Lightnovels\reincarnation-of-the-strongest-sword-god" --last 50 -i --format pdf --suppress

Development

You are very welcome to contribute in this project. You can:

  • create new issues pointing out the bugs.
  • solve existing issues.
  • add your own sources.
  • add new output formats.
  • create new bots.

Adding new source

  • Create new crawler using the sources/_template_.py as template.
  • Update Supported sources section in README.md
  • Add some test inputs to test_user_inputs variable in lncrawl/bots/test/test_inputs.py

Adding new Bot

Supported sources

Request new one by creating a new issue.

Available Sources Can Search Can Login Maintainer
http://boxnovel.cloud @SirGryphin
http://boxnovel.org @dipu-bd
http://hs2ppe.co.uk @SirGryphin
http://liberspark.com
http://novelfull.com @dipu-bd
http://novels.cloud @SirGryphin
http://tiknovel.com
http://wspadancewichita.com @SirGryphin
http://wuxiaworld.cloud @SirGryphin
http://www.fujitranslation.com
http://www.hanyunovels.site @SirGryphin
http://www.machinenoveltranslation.com
http://www.tiknovel.com
http://zenithnovels.com
http://zhi-end.blogspot.co.id @SirGryphin
http://zhi-end.blogspot.com @SirGryphin
https://1stkissnovel.love @SirGryphin
https://88tangeatdrinkread.wordpress.com @SirGryphin
https://9kqw.com
https://allnovel.org @SirGryphin
https://amnesiactl.com @SirGryphin
https://anonanemone.wordpress.com @SirGryphin
https://arangscans.com @SirGryphin
https://asadatranslations.com @SirGryphin
https://automtl.wordpress.com @SirGryphin
https://babelnovel.com @dipu-bd
https://bestlightnovel.com
https://book.qidian.com
https://booknet.com @dipu-bd, @SirGryphin
https://boxnovel.com @dipu-bd
https://boxnovel.online @SirGryphin
https://clicknovel.net @SirGryphin
https://creativenovels.com
https://crescentmoon.blog
https://daonovel.com @SirGryphin
https://darktranslation.com @SirGryphin
https://demontranslations.com @SirGryphin
https://dmtranslationscn.com @SirGryphin
https://docln.net @dipu-bd
https://dsrealmtranslations.com @SirGryphin
https://es.mtlnovel.com
https://exiledrebelsscanlations.com @SirGryphin
https://fanstranslations.com @SirGryphin
https://fastnovel.net @SirGryphin
https://foxaholic.com
https://fr.mtlnovel.com
https://fujitranslation.com @SirGryphin
https://hui3r.wordpress.com @SirGryphin
https://id.mtlnovel.com
https://inadequatetranslations.wordpress.com @SirGryphin
https://indowebnovel.id
https://infinitenoveltranslations.net @SirGryphin
https://instadoses.com
https://jpmtl.com @dipu-bd
https://jstranslations1.com @SirGryphin
https://justatranslatortranslations.com @SirGryphin
https://kiss-novel.com
https://kisslightnovels.info
https://lemontreetranslations.wordpress.com @SirGryphin
https://light-novel.online
https://lightnovel.tv @SirGryphin
https://lightnovel.world @SirGryphin
https://lightnovelbastion.com @dipu-bd
https://lightnovelheaven.com @SirGryphin
https://lightnovelkiss.com @SirGryphin
https://lightnovelsonl.com @SirGryphin
https://lightnovelstranslations.com @SirGryphin
https://listnovel.com
https://litnet.com
https://ln.hako.re @dipu-bd
https://lnmtl.com @dipu-bd
https://m.chinesefantasynovels.com
https://m.mywuxiaworld.com
https://m.novelspread.com
https://m.readlightnovel.cc
https://m.romanticlovebooks.com
https://m.wuxiaworld.co @dipu-bd
https://mangatoon.mobi
https://meionovel.id
https://moonstonetranslation.com @SirGryphin
https://morenovel.net @SirGryphin
https://myoniyonitranslations.com
https://mysticalmerries.com @SirGryphin
https://newsite.kolnovel.com @SirGryphin
https://novel27.com @SirGryphin
https://novelcake.com @SirGryphin
https://novelcrush.com @SirGryphin
https://novelextra.com @SirGryphin
https://novelfull.com @dipu-bd
https://novelfullplus.com @dipu-bd, @SirGryphin
https://novelgate.net @SirGryphin
https://novelgo.id/
https://novelonlinefree.com @SirGryphin
https://novelonlinefull.com
https://novelraw.blogspot.com
https://novels.pl @dipu-bd
https://novelsite.net @SirGryphin
https://novelsonline.net @SirGryphin
https://novelsrock.com
https://noveltranslate.com @SirGryphin
https://noveltrench.com @SirGryphin
https://omgnovels.com @SirGryphin
https://overabook.com @SirGryphin
https://ranobelib.me
https://readlightnovels.net @PreownedFIN
https://readwebnovels.net @SirGryphin
https://reincarnationpalace.com @SirGryphin
https://rewayat.club
https://shalvationtranslations.wordpress.com @SirGryphin
https://skynovel.org/ @SirGryphin
https://sleepytranslations.com @SirGryphin
https://steambunlightnovel.com @SirGryphin
https://supernovel.net @SirGryphin
https://toc.qidianunderground.org @dipu-bd
https://tomotranslations.com
https://totallytranslations.com @SirGryphin, @dipu-bd
https://tunovelaligera.com @SirGryphin
https://viewnovel.net @SirGryphin
https://vipnovel.com @SirGryphin
https://vistranslations.wordpress.com @SirGryphin
https://volarenovels.com
https://wbnovel.com
https://webnovel.online
https://webnovelindonesia.com
https://webnovelonline.com
https://wondernovels.com @SirGryphin
https://woopread.com
https://wordexcerpt.com @dipu-bd, @SirGryphin
https://wordexcerpt.org @dipu-bd, @SirGryphin
https://wuxiaworld.io @SirGryphin
https://wuxiaworld.live @SirGryphin
https://wuxiaworld.name @SirGryphin
https://wuxiaworld.online @dipu-bd
https://wuxiaworld.site @dipu-bd
https://wuxiaworldsite.co @dipu-bd
https://www.aixdzs.com
https://www.asianhobbyist.com
https://www.box-novel.com @SirGryphin
https://www.daocaorenshuwu.com @SirGryphin
https://www.f-w-o.com @SirGryphin
https://www.flying-lines.com @dipu-bd
https://www.foxteller.com @dipu-bd
https://www.freelightnovel.com @SirGryphin
https://www.fuyuneko.org @SirGryphin
https://www.idqidian.us
https://www.koreanmtl.online @dipu-bd
https://www.lightnovelpub.com
https://www.lunarletters.com @SirGryphin
https://www.machine-translation.org
https://www.miraslation.net @SirGryphin
https://www.mtlnovel.com
https://www.mywuxiaworld.com
https://www.novelall.com
https://www.novelcool.com @SirGryphin
https://www.novelhall.com
https://www.novelhunters.com @SirGryphin
https://www.novelpassion.com @SirGryphin
https://www.novelringan.com
https://www.novels.pl @dipu-bd
https://www.novelspread.com
https://www.novelupdates.cc @SirGryphin
https://www.oppatranslations.com @SirGryphin
https://www.qidian.com
https://www.readlightnovel.cc
https://www.readlightnovel.org
https://www.readnovelfull.com
https://www.romanticlovebooks.com
https://www.royalroad.com
https://www.scribblehub.com
https://www.shinsori.com
https://www.tapread.com
https://www.translateindo.com
https://www.virlyce.com @SirGryphin
https://www.wattpad.com @dipu-bd
https://www.webnovel.com @dipu-bd
https://www.webnovelover.com @SirGryphin
https://www.worldnovel.online
https://www.wuxialeague.com
https://www.wuxiaworld.co @dipu-bd
https://www.wuxiaworld.com @dipu-bd
https://www.x81zw.com @SirGryphin
https://www.xiainovel.com @SirGryphin
https://www.xsbiquge.com @SirGryphin
https://yukinovel.id
https://zinnovel.com @SirGryphin

Rejected sources

Rejected Sources Reason
http://fullnovel.live 403 - Forbidden: Access is denied
http://gravitytales.com Redirects to webnovel.com
http://moonbunnycafe.com Does not follow uniform format
https://4scanlation.xyz Site moved
https://anythingnovel.com Site broken
https://bestoflightnovels.com Site moved
https://chrysanthemumgarden.com Removed on request of the owner #649
https://fsapk.com Site is not working
https://indomtl.com Does not like to be crawled
https://lnindo.org Does not like to be crawled
https://mtled-novels.com Domain is expired
https://novelcrush.com Site is down
https://novelplanet.com Site is closed
https://pery.info Site is down
https://writerupdates.com Site is down
https://www.centinni.com Site is down
https://www.hotmtlnovel.xyz Cloudflare version 2 challenge
https://www.jieruihao.cn Unavailable
https://www.noveluniverse.com Site is down
https://www.novelupdates.com Does not host any novels
https://www.novelv.com Site is down
https://www.rebirth.online Site moved

Supported output formats

  • JSON
  • EPUB
  • TEXT
  • WEB
  • DOCX
  • MOBI
  • PDF
  • RTF
  • TXT
  • AZW3
  • FB2
  • LIT
  • LRF
  • OEB
  • PDB
  • PML
  • RB
  • SNB
  • TCR
  • HTML

Supported bots

  • Console Bot
  • Telegram Bot
  • Discord Bot

lightnovel-crawler's People

Contributors

amritoo avatar ancientcatz avatar borgsquared avatar diogenes895 avatar dipu-bd avatar dragonroad99 avatar drewbitt avatar eduard93 avatar epicpkmn11 avatar frybin avatar galunid avatar jdtcoder avatar juh9870 avatar kuwoyuki avatar mchubby avatar nntin avatar preownedfin avatar sirgryphin avatar skyme5 avatar tetraphoz avatar tidux avatar typotami avatar yudilee avatar

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.