-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new source
copymanga
(#434)
* init * fix: update source name * feat: add urls for deep link * fix: update source icon * feat: filter `題材` * feat: filter `地區` * feat: filter `狀態` * feat: sort * feat: generate url for filters * feat: generate url for search * feat: get `MangaPageResult` of filters page * feat: get `MangaPageResult` of search json * feat: complete `get_manga_details` * feat: complete `get_chapter_list` * feat: complete `get_page_list` * feat: complete `handle_url` * refactor: remove unused code * refactor: reformat code * feat: add urls for deep link * refactor: remove unused feature * refactor: rename variable `plaintext_vec` to `plaintext` * fix: indent with tabs
- Loading branch information
Showing
11 changed files
with
1,141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build] | ||
target = "wasm32-unknown-unknown" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[package] | ||
name = "copymanga" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[profile.dev] | ||
panic = "abort" | ||
|
||
[profile.release] | ||
panic = "abort" | ||
opt-level = "s" | ||
strip = true | ||
lto = true | ||
|
||
[dependencies] | ||
aes = "0.8.3" | ||
aidoku = { git = "https://github.com/Aidoku/aidoku-rs", features = ["helpers"] } | ||
cbc = "0.1.2" | ||
hex = { version = "0.4.3", default-features = false, features = ["alloc"] } | ||
uuid = { version = "1.4.1", default-features = false } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cargo +nightly build --release | ||
mkdir -p target/wasm32-unknown-unknown/release/Payload | ||
cp res/* target/wasm32-unknown-unknown/release/Payload | ||
cp target/wasm32-unknown-unknown/release/*.wasm target/wasm32-unknown-unknown/release/Payload/main.wasm | ||
cd target/wasm32-unknown-unknown/release ; zip -r package.aix Payload | ||
mv package.aix ../../../package.aix |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[ | ||
{ | ||
"type": "title" | ||
}, | ||
{ | ||
"type": "select", | ||
"name": "題材", | ||
"options": [ | ||
"全部", | ||
"愛情", | ||
"歡樂向", | ||
"冒險", | ||
"奇幻", | ||
"百合", | ||
"校園", | ||
"科幻", | ||
"東方", | ||
"耽美", | ||
"生活", | ||
"格鬥", | ||
"輕小說", | ||
"懸疑", | ||
"其他", | ||
"神鬼", | ||
"職場", | ||
"TL", | ||
"萌系", | ||
"治癒", | ||
"長條", | ||
"四格", | ||
"節操", | ||
"艦娘", | ||
"競技", | ||
"搞笑", | ||
"偽娘", | ||
"熱血", | ||
"勵志", | ||
"性轉換", | ||
"彩色", | ||
"後宮", | ||
"美食", | ||
"偵探", | ||
"AA", | ||
"音樂舞蹈", | ||
"魔幻", | ||
"戰爭", | ||
"歷史", | ||
"異世界", | ||
"驚悚", | ||
"機戰", | ||
"都市", | ||
"穿越", | ||
"恐怖", | ||
"C100", | ||
"重生", | ||
"C99", | ||
"C101", | ||
"C97", | ||
"C96", | ||
"生存", | ||
"宅系", | ||
"武俠", | ||
"C98", | ||
"C95", | ||
"FATE", | ||
"轉生", | ||
"無修正", | ||
"仙俠", | ||
"LoveLive" | ||
] | ||
}, | ||
{ | ||
"type": "select", | ||
"name": "地區", | ||
"options": [ | ||
"全部", | ||
"日漫", | ||
"韓漫", | ||
"美漫" | ||
] | ||
}, | ||
{ | ||
"type": "select", | ||
"name": "狀態", | ||
"options": [ | ||
"全部", | ||
"連載中", | ||
"已完結", | ||
"短篇" | ||
] | ||
}, | ||
{ | ||
"type": "sort", | ||
"name": "排序", | ||
"canAscend": true, | ||
"options": [ | ||
"更新時間", | ||
"熱門" | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"info": { | ||
"id": "zh.copymanga", | ||
"lang": "zh", | ||
"name": "拷貝漫畫", | ||
"version": 1, | ||
"url": "https://copymanga.site", | ||
"urls": [ | ||
"https://copymanga.site", | ||
"https://www.copymanga.site", | ||
"https://copymanga.tv", | ||
"https://www.copymanga.tv", | ||
"https://mangacopy.com", | ||
"https://www.mangacopy.com" | ||
], | ||
"nsfw": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use aes::{ | ||
cipher::{block_padding::Pkcs7, BlockDecryptMut, KeyIvInit}, | ||
Aes128, | ||
}; | ||
use aidoku::std::String; | ||
|
||
type Aes128CbcDec = cbc::Decryptor<Aes128>; | ||
|
||
const KEY: &[u8] = b"xxxmanga.woo.key"; | ||
|
||
pub trait EncryptedString { | ||
fn decrypt(self) -> String; | ||
} | ||
|
||
impl EncryptedString for String { | ||
fn decrypt(self) -> String { | ||
let encrypted_data = self.as_bytes(); | ||
let iv = &encrypted_data[..16]; | ||
let mut ciphertext = | ||
hex::decode(&encrypted_data[16..]).expect("Failed to hex-decode ciphertext."); | ||
|
||
let plaintext = Aes128CbcDec::new(KEY.into(), iv.into()) | ||
.decrypt_padded_mut::<Pkcs7>(&mut ciphertext) | ||
.expect("Failed to decrypt chapter list"); | ||
String::from_utf8_lossy(plaintext).into() | ||
} | ||
} |
Oops, something went wrong.