GithubHelp home page GithubHelp logo

pixiv-novel's Introduction

Lightweight pixiv novel viewer

Lightweight frontend for pixiv novels.

Features: search/view novels, view rankings, generates simple html, no javascript, autosave, optional login with cookies.txt, written in python, single python file with no 3rd party dependency, also works on android+termux.

Usage

wget 'https://codeberg.org/sj2tpgk/pixiv-novel/raw/branch/main/pixiv-novel.py'
python pixiv-novel.py --browser
# Automatically opens daily ranking in browser (0.0.0.0:8080 by default)

Instances

Screenshots

Cookies

To search/view age-restricted contents, put cookies.txt in current directory:

  1. Login to pixiv.

  2. Export cookies.txt using this Chrome addon or Firefox addon.

  3. Check cookies.txt is in the current directory and run script:

    $ grep -i pixiv cookies.txt
    www.pixiv.net   FALSE   /       TRUE    ...
    ...
    $ python pixiv-novel.py

When HTTP Error happens, try re-exporting your cookies.txt.

Options

usage: pixiv-novel.py [-h] [-b ADDR] [-c DIR] [-d URL] [-k COOKIE] [-p PORT] [-s DIR] [-v] [--browser] [--nocolor] [--sslcert SSLCERT] [--sslkey SSLKEY] [--test]

Start web server to view pixiv novels.

options:
  -h, --help            show this help message and exit
  -b ADDR, --bind ADDR  Bind to this address (default: 0.0.0.0)
  -c DIR, --cachedir DIR
                        Cache directory (default: _cache; set '' to disable)
  -d URL, --download URL
                        Download a novel and exit
  -k COOKIE, --cookie COOKIE
                        Path of cookies.txt (default: cookies.txt; set '' to disable)
  -p PORT, --port PORT  Port number (default: 8080)
  -s DIR, --savedir DIR
                        Auto save novels in this directory (default: _save; set '' to disable)
  -v, --verbose         Verbose mode
  --browser             Open in browser
  --nocolor             Disable character name colors
  --sslcert SSLCERT     HTTPS cert file
  --sslkey SSLKEY       HTTPS key file
  --test

Character name colorizer

This script has a feature to colorize each character name with different colors in SS-style novels (e.g. "太郎" in "太郎「こんにちは」").

It needs a database of character names & colors. See the source code for database definitions.

pixiv-novel's People

Contributors

sj2tpgk avatar

Stargazers

 avatar  avatar

Watchers

 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.