Skip to content

api: support new xiaohongshu links, add fallbacks to getRedirectingURL#1392

Merged
wukko merged 1 commit intoimputnet:developfrom
KwiatekMiki:xiaohongshu-fix
Jul 18, 2025
Merged

api: support new xiaohongshu links, add fallbacks to getRedirectingURL#1392
wukko merged 1 commit intoimputnet:developfrom
KwiatekMiki:xiaohongshu-fix

Conversation

@KwiatekMiki
Copy link
Contributor

@KwiatekMiki KwiatekMiki commented Jul 12, 2025

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)

@KwiatekMiki KwiatekMiki changed the base branch from main to develop July 12, 2025 13:43
@wukko wukko force-pushed the xiaohongshu-fix branch from 2fc417a to 17f54f3 Compare July 18, 2025 14:24
@wukko wukko changed the title add support for new share links and update tests for xiaohongshu api: support new xiaohongshu links, add fallbacks to getRedirectingURL Jul 18, 2025
@wukko wukko force-pushed the xiaohongshu-fix branch from 17f54f3 to 1084e4d Compare July 18, 2025 14:29
@wukko wukko requested a review from dumbmoron July 18, 2025 14:30
@wukko wukko force-pushed the xiaohongshu-fix branch from 1084e4d to 16f8b73 Compare July 18, 2025 14:32
@wukko
Copy link
Member

wukko commented Jul 18, 2025

thank you for the PR! i cleaned up the code to avoid clutter and moved the fallback to GET to the general function so that all services can benefit from it. i'm not sure if updating tests makes much sense, cuz the links will expire in less than 14 days, but maybe @dumbmoron has an opinion on that.

Copy link
Member

@dumbmoron dumbmoron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :3

@wukko wukko merged commit 16f8b73 into imputnet:develop Jul 18, 2025
27 checks passed
@huangtang70
Copy link

Thank you all for the hardworking💋💋💋

amanhnb88 pushed a commit to amanhnb88/unduh-media-bebas that referenced this pull request Mar 8, 2026
this will allow instances that don't use my fork to get 100% until github/imputnet/cobalt#1392 gets merged
will get reverted once it gets merged and instances start using the new version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants