mirror of
https://github.com/imputnet/cobalt.git
synced 2026-05-22 06:18:25 -05:00
[PR #1392] [MERGED] api: support new xiaohongshu links, add fallbacks to getRedirectingURL #14096
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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.