#api #api-client #manga #mu #library #async #tosho

tosho-musq

An asynchronous client of MU! API by SQ

5 releases

0.3.4 Mar 20, 2024
0.3.3 Feb 28, 2024
0.3.2 Feb 22, 2024
0.3.1 Feb 17, 2024
0.3.0 Feb 14, 2024

#543 in Web programming

Download history 262/week @ 2024-02-12 168/week @ 2024-02-19 161/week @ 2024-02-26 3/week @ 2024-03-11 178/week @ 2024-03-18 75/week @ 2024-04-01

256 downloads per month
Used in tosho

MIT license

78KB
1K SLoC

tosho-musq

crates.io version

An asynchronous client for the MU! API by SQ.

The following crate is used by the tosho app.

Usage

Download the tosho app, or you can utilize this crate like any other Rust crate:

use tosho_musq::MUClient;
use tosho_musq::constants::get_constants;

#[tokio::main]
async fn main() {
    let client = MUClient::new("1234", get_constants(1));
    let manga = client.get_manga(240).await.unwrap();
    println!("{:?}", manga);
}

Authentication

The following sources do not have any easy authentication method.

The command to authenticate is tosho mu auth.

It's recommended that you set up network intercepting first; please read INTERCEPTING.

Using the CLI, you can do this:

$ tosho mu auth secret -t android

Or, with Apple constants:

$ tosho mu auth secret -t ios

With crates, you can follow the above usages.

Android

  1. Open the source app.
  2. Click on the home page or my page.
  3. Observe the requests on HTTP Toolkit and find the request to the API that has secret as the query parameters.
  4. Save that secret elsewhere and authenticate with tosho.

Apple

  1. Open the Stream app and click Sniff Now.
  2. Go to the source app and open the Home or My Page.
  3. Return to the Stream app and click Sniff History, then select the most recent item.
  4. Find the request that goes to the API of the source app and locate the request that has secret=xxxxx in them.
  5. Copy the link and save the secret value somewhere so you can authenticate with tosho.

Disclaimer

This project is designed as an experiment and to create a local copy for personal use. These tools will not circumvent any paywall, and you will need to purchase and own each chapter with your own account to be able to make your own local copy.

We're not responsible if your account got deactivated.

License

This project is licensed with MIT License (LICENSE or http://opensource.org/licenses/MIT)

Dependencies

~7–21MB
~304K SLoC