{"id":15479412,"url":"https://github.com/niuhuan/pica-rust","last_synced_at":"2026-02-17T17:32:30.920Z","repository":{"id":44360545,"uuid":"428109229","full_name":"niuhuan/pica-rust","owner":"niuhuan","description":"Rust哔卡漫画API","archived":false,"fork":false,"pushed_at":"2026-01-14T05:15:15.000Z","size":64,"stargazers_count":42,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T07:26:24.249Z","etag":null,"topics":["acg","bika","cosplay","pica","picacg","picacomic","picacomic-api","r-18","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niuhuan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-15T03:22:03.000Z","updated_at":"2026-01-14T06:05:39.000Z","dependencies_parsed_at":"2024-09-17T17:47:33.687Z","dependency_job_id":"4d192d69-7f67-4e5f-aef0-8145649f625f","html_url":"https://github.com/niuhuan/pica-rust","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.26086956521739135","last_synced_commit":"0932730b65fd003b22af3116f866e25fa342359d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niuhuan/pica-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fpica-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fpica-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fpica-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fpica-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niuhuan","download_url":"https://codeload.github.com/niuhuan/pica-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niuhuan%2Fpica-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29551257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acg","bika","cosplay","pica","picacg","picacomic","picacomic-api","r-18","rust"],"created_at":"2024-10-02T04:21:15.187Z","updated_at":"2026-02-17T17:32:30.909Z","avatar_url":"https://github.com/niuhuan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"PICA-RUST\n===========\nRust哔卡漫画API\n\n## 实现功能\n\n- [x] 用户\n    - [x] 注册 / 登录 / 获取用户信息 / 打卡\n    - [x] 修改签名 / 修改头像\n    - [x] 找回密码\n- [x] 漫画\n    - [x] 分类 / 随机本子 / 获取章节 / 获取图片\n    - [x] 收藏漫画 / 喜欢漫画\n    - [x] 获取漫画评论 / 对漫画发表评论及回复\n    - [x] 我的评论 / 喜欢/取消喜欢评论 /\n    - [x] 搜索漫画 / 大家都在搜\n    - [x] 排行榜 / 骑士榜 \n    - [x] 看了这个本子的也在看\n    - [x] 游戏列表 / 详情 / 评论相关\n- [x] 网络\n    - [x] 获取官方分流\n    - [x] 代理 / 分流\n\n## 使用方法\n\n在Cargo.toml中增加依赖\n\n```toml\n[dependencies]\npica = { git = \"https://github.com/niuhuan/pica-rust.git\", branch = \"master\" }\n```\n\n基本使用\n\n```rust\nuse pica::{Client, Sort};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // 创建客户端\n    let client = Client::new().await;\n\n    // 可选：设置代理或分流\n    client.set_proxy(None).await?;\n    client\n        .set_switch_addresses(vec![\"172.67.80.1:443\".to_string()])\n        .await?;\n\n    // 登录或直接注入 token\n    client.login(\"username\", \"password\").await?;\n    // client.set_token(\"token\").await;\n\n    // 获取漫画列表\n    let comics = client\n        .comics(None, None, None, None, None, Sort::SORT_DEFAULT, 1)\n        .await?;\n\n    println!(\"got {} comics\", comics.docs.len());\n    Ok(())\n}\n```\n\n链式 Builder 示例\n\n```rust\n// 与 comics 等效，但可链式配置后直接 .await\nlet page = client\n    .comics_builder()\n    .category(\"纯爱\")\n    .sort(Sort::SORT_TIME_NEWEST)\n    .page(1)\n    .await?;\nprintln!(\"docs: {}\", page.docs.len());\n```\n\n在 [client.rs](src/client.rs) 中查看可用的分流列表\n在 [test.rs](src/test.rs) 中的 download_first_comic_cover_and_page , 是从登录到下载的完整demo, 测试时需要设置环境变量\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fpica-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniuhuan%2Fpica-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniuhuan%2Fpica-rust/lists"}