[PR #143] [CLOSED] Resolve bilibili mobile b23.tv short links to full bilibili URL #1025

Closed
opened 2025-11-09 10:04:18 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imputnet/cobalt/pull/143
Author: @TylerLafayette
Created: 6/21/2023
Status: Closed

Base: currentHead: bilibili-short-url-support


📝 Commits (2)

  • c2470ea bilibili: resolve b23.tv short links to full bilibili url
  • 5ae1cef bilibili: follow b23 case with a break; - oops

📊 Changes

1 file changed (+9 additions, -0 deletions)

View changed files

📝 src/modules/api.js (+9 -0)

📄 Description

This PR allows a user to submit a b23.tv shortlink, which looks like this: https://b23.tv/lbMyOI9. Bilibili gives you links in this format when you copy a video URL on the mobile app (not on the website afaik). Unlike youtu.be, the ID following b23.tv/ isn't the same as the ID in the bilibili.com/video/:id URL, so it's necessary to follow the link to resolve the redirect. The drawback is that this causes an additional request on the backend for b23.tv URLs which might be undesirable to add to cobalt.

Thanks in advance for your consideration, cobalt is super useful to me and I appreciate the effort :)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imputnet/cobalt/pull/143 **Author:** [@TylerLafayette](https://github.com/TylerLafayette) **Created:** 6/21/2023 **Status:** ❌ Closed **Base:** `current` ← **Head:** `bilibili-short-url-support` --- ### 📝 Commits (2) - [`c2470ea`](https://github.com/imputnet/cobalt/commit/c2470eaa19301c6f084bdaf0e6f41af3c1163a3a) bilibili: resolve `b23.tv` short links to full bilibili url - [`5ae1cef`](https://github.com/imputnet/cobalt/commit/5ae1cefa1117c1aaf35204f8b8a19d101b4e61f0) bilibili: follow `b23` case with a `break;` - oops ### 📊 Changes **1 file changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/modules/api.js` (+9 -0) </details> ### 📄 Description This PR allows a user to submit a `b23.tv` shortlink, which looks like this: `https://b23.tv/lbMyOI9`. Bilibili gives you links in this format when you copy a video URL on the mobile app (not on the website afaik). Unlike `youtu.be`, the ID following `b23.tv/` isn't the same as the ID in the `bilibili.com/video/:id` URL, so it's necessary to follow the link to resolve the redirect. The drawback is that this causes an additional request on the backend for b23.tv URLs which might be undesirable to add to cobalt. Thanks in advance for your consideration, cobalt is super useful to me and I appreciate the effort :) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-09 10:04:18 -06:00
Sign in to join this conversation.