Best-effort title & thumbnail fetcher for otomad https://roxy.otodb.net
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
SnO₂WMaN 512d0e01f1
Make /json always return JSON (#14)
Return `{status:"ok", payload:...}` on success and
`{status:"bad", reason:...}` on failure so the response is
always JSON instead of plain text on errors.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 21:15:56 +09:00
.vscode Update misc 2025-11-25 05:14:07 +09:00
docs Fix about notes_20251206 (#12) 2025-12-05 22:53:45 +09:00
src Make /json always return JSON (#14) 2026-06-01 21:15:56 +09:00
.editorconfig Update misc 2025-11-25 05:14:07 +09:00
.gitignore Update misc 2025-11-25 05:14:07 +09:00
bun.lock Add /json endpoint (#13) 2026-06-01 17:49:32 +09:00
LICENSE Add LICENSE etc. 2025-11-25 03:14:51 +09:00
package.json xml output 2025-11-25 07:15:48 +09:00
README.md Fix about notes_20251206 (#12) 2025-12-05 22:53:45 +09:00
renovate.json Add renovate.json (#6) 2025-11-26 11:32:29 +09:00
tsconfig.json Update misc 2025-11-25 05:27:22 +09:00
worker-configuration.d.ts Update misc 2025-11-25 05:27:22 +09:00
wrangler.jsonc Update wrangler config name to roxy (#7) 2025-11-26 09:40:59 +09:00

Roxy

https://roxy.otodb.net/xml?q=sm42246476

# Nicovideo
http https://roxy.otodb.net/xml q=="sm42246476" | xq -x "data/title"

http https://roxy.otodb.net/xml q=="https://www.nicovideo.jp/watch/sm44769600" | xq -x "data/thumbnail"

# Youtube
http https://roxy.otodb.net/xml q=="w6Tjn_M5rTc" | xq -x "data/title"

http https://roxy.otodb.net/xml q=="https://www.youtube.com/watch?v=w6Tjn_M5rTc" | xq -x "data/title"

# Bilibili
http https://roxy.otodb.net/xml q=="BV19M4y1h7wM" | xq -x "data/title"

http https://roxy.otodb.net/xml q=="https://www.bilibili.com/video/BV19M4y1h7wM" | xq -x "data/title"

# SoundCloud
http https://roxy.otodb.net/xml q=="https://soundcloud.com/hxudmdc1lxrs/worldwidepunyapunya" | xq -x "data/title"

様々な動画サイトから透過的に音MADのタイトルやサムネイルをベストエフォートで取得するプロキシです. otoDBに登録されている場合はそちらのデータを参照し,まだ登録されていない場合は各動画サイトから可能な限りタイトルなどを取得します. Googleスプレッドシートの利用を特に想定しているのでXMLのデータを返却するようにしています.

Usage

Google Spreadsheet

使用例

動画の情報はA2セルに入っているものと仮定します.

次の関数で動画タイトルが取得できます.

=IF(A2<>"", IMPORTXML(CONCATENATE("https://roxy.otodb.net/xml?q=", A2),"/data/title"), "")

次の関数でサムネイルのURLが取得できます.

=IF(A2<>"", IMAGE(IMPORTXML(CONCATENATE("https://roxy.otodb.net/xml?q=", A2),"/data/thumbnail")), "")

次の関数で識別子が取得できます.重複チェックなどに利用出来ます.

=IF(A2<>"", IMAGE(IMPORTXML(CONCATENATE("https://roxy.otodb.net/xml?q=", A2),"/data/identifier")), "")

集計用の機能に関しては"nerdtronics2の振り返り③ (選曲管理/音MAD-mix監修) #ナートロ2" のスプレッドシートなどを参考にすると良いかもしれません.

Notes

Setup

To install dependencies:

bun install

To run:

bun run dev

open http://localhost:8787

Test

# Nicovideo
http localhost:8787/xml q=="sm44769600"

http localhost:8787/xml q=="https://www.nicovideo.jp/watch/sm44769600"

# Youtube
http localhost:8787/xml q=="w6Tjn_M5rTc"

http localhost:8787/xml q=="https://www.youtube.com/watch?v=w6Tjn_M5rTc"

# Bilibili
http localhost:8787/xml q=="BV19M4y1h7wM"

http localhost:8787/xml q=="https://www.bilibili.com/video/BV19M4y1h7wM"

# Soundcloud
http localhost:8787/xml q=="https://soundcloud.com/hxudmdc1lxrs/worldwidepunyapunya"

License

MIT License

Acknowledgement

sm42246476