when you share a video (or anything else), you now get a new type of link, example: http://xhslink.com/m/2wAnaTkLRc1
new links don't support the HEAD method (you get a 404 response), so i had to use GET. the content length is ~420 bytes so it shouldn't be that bad.
also, all of the links in tests expired so i replaced them
this is my first contribution to cobalt in some time and i hope i did everything right, if not please tell me :3 (i downloaded their app on my phone just for this)
🔄 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/1392
**Author:** [@KwiatekMiki](https://github.com/KwiatekMiki)
**Created:** 7/12/2025
**Status:** ✅ Merged
**Merged:** 7/18/2025
**Merged by:** [@wukko](https://github.com/wukko)
**Base:** `develop` ← **Head:** `xiaohongshu-fix`
---
### 📝 Commits (1)
- [`16f8b73`](https://github.com/imputnet/cobalt/commit/16f8b73815719a5a03ab02035aad9a0f2de8efee) api: support new xiaohongshu links, add fallbacks to getRedirectingURL
### 📊 Changes
**6 files changed** (+33 additions, -17 deletions)
<details>
<summary>View changed files</summary>
📝 `api/src/misc/utils.js` (+24 -8)
📝 `api/src/processing/service-config.js` (+1 -1)
📝 `api/src/processing/service-patterns.js` (+1 -1)
📝 `api/src/processing/services/xiaohongshu.js` (+2 -2)
📝 `api/src/processing/url.js` (+1 -1)
📝 `api/src/util/tests/xiaohongshu.json` (+4 -4)
</details>
### 📄 Description
when you share a video (or anything else), you now get a new type of link, example: http://xhslink.com/m/2wAnaTkLRc1
new links don't support the HEAD method (you get a 404 response), so i had to use GET. the content length is ~420 bytes so it shouldn't be that bad.
also, all of the links in tests expired so i replaced them
this is my first contribution to cobalt in some time and i hope i did everything right, if not please tell me :3
<sup>(i downloaded their app on my phone just for this)</sup>
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/imputnet/cobalt/pull/1392
Author: @KwiatekMiki
Created: 7/12/2025
Status: ✅ Merged
Merged: 7/18/2025
Merged by: @wukko
Base:
develop← Head:xiaohongshu-fix📝 Commits (1)
16f8b73api: support new xiaohongshu links, add fallbacks to getRedirectingURL📊 Changes
6 files changed (+33 additions, -17 deletions)
View changed files
📝
api/src/misc/utils.js(+24 -8)📝
api/src/processing/service-config.js(+1 -1)📝
api/src/processing/service-patterns.js(+1 -1)📝
api/src/processing/services/xiaohongshu.js(+2 -2)📝
api/src/processing/url.js(+1 -1)📝
api/src/util/tests/xiaohongshu.json(+4 -4)📄 Description
when you share a video (or anything else), you now get a new type of link, example: http://xhslink.com/m/2wAnaTkLRc1
new links don't support the HEAD method (you get a 404 response), so i had to use GET. the content length is ~420 bytes so it shouldn't be that bad.
also, all of the links in tests expired so i replaced them
this is my first contribution to cobalt in some time and i hope i did everything right, if not please tell me :3
(i downloaded their app on my phone just for this)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.