Skip to content

xMohnad/SManga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SManga

SManga is a command-line tool for scraping manga chapters from various websites using Scrapy and Typer.


Installation

From Source

To install SManga from the source, follow these steps:

  1. Clone the repository:

    git clone https://github.com/xMohnad/SManga.git
    cd SManga
  2. Install SManga as a CLI tool:

    pip install .
  3. Verify installation:

    smanga --help

Commands Overview

1. crawl - Scrape manga chapters from a given link

smanga crawl <link> [OPTIONS]
  • Description:
    Scrapes chapters from the provided link and saves the data in a JSON file.

  • Options:

    • link (positional): The link to scrape chapters from.
    • -f, --file <FILE>: Output file name for saving the scraped data. Defaults to the manga title.
    • -d, --dest <DIRECTORY>: Destination directory to save the scraped file.
    • -o, --overwrite: Overwrites the existing file if it already exists.
    • -r, --recent: Fetch the most recent saved chapters instead of scraping.
    • -s, --spider <name>: Choose a specific spider to use.
    • -u, --User-Agent <string>: Custom User-Agent for the scraper.
  • Example:

    smanga crawl "https://example-manga-site.com/manga-title/1" -f data.json -o -u "Custom-Agent"

2. list - List all available spiders

smanga list
  • Description:
    Displays a list of all available spiders that can be used for scraping.

  • Example:

    smanga list

3. add - Add manga data for future scraping

smanga add <json_file>
  • Description:
    Adds manga data from a JSON file for later use with the -r option in the crawl command.

  • Options:

    • json_file: The path to the JSON file containing manga data.
  • Example:

    smanga add manga_scraped_data.json

Notes

  • Some websites may reject scraper requests. It is recommended to use a valid User-Agent.
  • The -r option allows fetching previously scraped data without making a new request.

License

SManga is open-source software licensed under the MIT License. You can freely use, modify, and distribute the tool, provided you retain the original license and copyright.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages