GithubHelp home page GithubHelp logo

lussaczheng / dandanplay-resource-service Goto Github PK

View Code? Open in Web Editor NEW
70.0 70.0 22.0 2.2 MB

弹弹play 资源搜索节点 API 实现,基于 Cloudflare Workers, Deno Deploy, Golang 或 Rust 的四种实现。 || API implementations for "dandanplay" resource search service.

License: Apache License 2.0

Batchfile 0.81% Go 28.47% Shell 0.69% Python 0.12% HTML 4.38% TypeScript 32.42% Rust 33.11%
anime-search api api-service cloudflare-workers dandanplay deno-deploy golang rust typescript

dandanplay-resource-service's Introduction

dandanplay-resource-service

cfw-impl deno-impl go-impl rust-impl

GitHub release GitHub All Releases jsDelivr hits

API implementations for "dandanplay" resource search service.
弹弹play 资源搜索节点的 API 实现。

提供分别基于 Cloudflare Workers, Deno Deploy, GolangRust 的四种实现。

特性

  • Serverless 优先,也支持在本地或服务器运行
  • 支持 搜索指令 : $realtime , $page , $limit
  • 部署或运行后,访问根路径可以看到简易的测试页面

Cloudflare Workers

注册一个 Cloudflare 免费账户即可部署,无需 远程服务器 或 常驻任何本地程序

  • 可在搜索引擎中搜索 "Cloudflare Workers部署教程" ,参照进行。
  • 由于暂未实现 缓存机制 ,且 Cloudflare Workers 免费版账户有每日 100,000 的请求次数限制,目前暂不提供演示站点。可以自行部署体验。

复制 worker.js 内容到 workers.dev 脚本编辑页面 中,部署即可。

Deno Deploy

使用 GitHub 账户登录注册 Deno Deploy 即可部署,无需 远程服务器 或 常驻任何本地程序

  • "New Project" -> "Play" -> "Playground" -> Paste code -> "Save & Deploy"
  • 由于 Deno Deploy 目前仍为 Beta 平台,风险和稳定性未知,且免费版账户有每日 100,000 的请求次数限制,目前暂不提供演示站点。可以自行部署体验。

复制 playground.js 内容到 Deno Playground 脚本编辑页面 中,部署即可。

Golang

Releases 页面 下载预编译的可执行文件到 本地 或 服务器 ,(重命名后)运行即可。

# 详细说明另见 `golang` 文件夹
$ dandanplay-resource-service -h

# 无参数,默认运行在 localhost:8080
$ dandanplay-resource-service

# 自定义端口 和 代理地址(可省略 "http://")
$ dandanplay-resource-service -P 9000 -x 127.0.0.1:10809

# 运行在 34543 端口并暴露服务到公网
$ dandanplay-resource-service -H 0.0.0.0 -P 34543

Rust

目前 Rust 版的功能、使用方法与 Golang 版基本一致,主要差异如下表所示。

比较项目 Rust Golang
可执行文件大小 ✔️
内存占用 ✔️
静态编译 ✔️ ✔️
编译速度 ✔️
交叉编译 ✔️

开发

了解如何在本地或服务器运行,或开发相关,详见各自实现所在的文件夹。

相关项目

参考资料

  1. API Specification - 弹弹play资源搜索节点API规范
  2. 关于“资源搜索”功能即将下线的通知
  3. 资源搜索相关问题的解答

TODO

  • 添加 Dockerfile
  • 引入缓存机制

Contributing

Issues, pull requests, and discussions are always welcome.

License

This project is licensed under the Apache-2.0 License.

dandanplay-resource-service's People

Contributors

lussaczheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dandanplay-resource-service's Issues

自动下载和搜索有较大的延迟

通常文件在dmhy发布的两个小时后才能通过dandanplay搜索到资源。以我们的重制人生为例,资源发布在dmhy时间为晚8:30左右,自动下载和在弹弹play里的搜索相关文件会延迟到凌晨1点左右统一发布,不知道是不是BUG。

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.