Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ that contains a better embed (that allows to play videos directly in Discord, fo
## Features & Highlights

- Supports Twitter, Nitter, Instagram, TikTok, Reddit, Threads, Bluesky, Snapchat, Facebook, Pixiv, Twitch, Spotify,
DeviantArt, Newgrounds, Mastodon, Tumblr, BiliBili, Pinterest, IFunny, YouTube, Imgur, Weibo, Fur Affinity,
DeviantArt, Newgrounds, Mastodon, Tumblr, BiliBili, Xiaohongshu, Pinterest, IFunny, YouTube, Imgur, Weibo, Fur Affinity,
Rule34.xxx, Danbooru, Gelbooru, e621, e926, Realbooru, Hypnohub, Konachan, Yande.re, Derpibooru, Rule34.paheal,
XBooru, TBIB, and any custom websites of your choice
- Posts translation
Expand Down Expand Up @@ -475,6 +475,22 @@ _Are you aware of any other fixer that isn't included here? Feel free to open an
- Other official public instances/redirects: `ppxiv.net`
- <img src="assets/pinterest.webp" alt="Pinterest" height="20"/> Pinterest
- [EmbedEZ • pinterestez.com](https://embedez.com) *Used by FixTweetBot*
- 📕 Xiaohongshu
- [EmbedEZ](https://embedez.com) *Used by FixTweetBot*
<details>
<summary>Comparison table</summary>

| Link type | [EmbedEZ](https://embedez.com) | Link example |
|--------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `/explore/:id` | ✔️ | https://www.xiaohongshu.com/explore/6a7a9cdb000000003301195a?xsec_token=AB483N-FfOfHY6C00apje97XpgXQ9SNRon6-WNUzBxzl4=&xsec_source=pc_feed |
| Translation | ❌ | / |
| Normal view | ✔️ | / |
| Direct view | ❌ | / |
| Gallery view | ❌ | / |
| Text view | ❌ | / |

> Tested the 08/09/2026
</details>
- <img src="assets/ifunny.webp" alt="IFunny" height="20"/> IFunny
- [EmbedEZ • ifunnyez.co](https://embedez.com) *Used by FixTweetBot*
- <img src="assets/youtube.webp" alt="Youtube" height="20"/> YouTube
Expand Down
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ emoji:
twitch: "🎮"
spotify: "🎵"
bilibili: "📺"
xiaohongshu: "📕"
ifunny: "🙂"
furaffinity: "🐾"
youtube: "📺"
Expand Down
15 changes: 15 additions & 0 deletions database/migrations/2026_09_10_010100_add_xiaohongshu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""AddXiaohongshu Migration."""

from masoniteorm.migrations import Migration


class AddXiaohongshu(Migration):
def up(self):
"""Add Xiaohongshu website settings."""
with self.schema.table("guilds") as table:
table.boolean("xiaohongshu").default(True)

def down(self):
"""Remove Xiaohongshu website settings."""
with self.schema.table("guilds") as table:
table.drop_column("xiaohongshu")
2 changes: 1 addition & 1 deletion locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ misc:
## Features & Highlights

- Supports Twitter, Nitter, Instagram, TikTok, Reddit, Threads, Bluesky, Snapchat, Facebook,
Pixiv, Twitch, Spotify, DeviantArt, Newgrounds, Mastodon, Tumblr, BiliBili, Pinterest, IFunny, YouTube, Imgur,
Pixiv, Twitch, Spotify, DeviantArt, Newgrounds, Mastodon, Tumblr, BiliBili, Xiaohongshu, Pinterest, IFunny, YouTube, Imgur,
Weibo, Fur Affinity, Rule34.xxx, Danbooru, Gelbooru, e621, e926, Realbooru, Hypnohub, Konachan, Yande.re,
Derpibooru, Rule34.paheal, XBooru, TBIB, and any custom websites of your choice
and any custom websites of your choice
Expand Down
10 changes: 10 additions & 0 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,15 @@ class BilibiliSetting(WebsiteBaseSetting):
proxies = {"BiliFix": "https://www.vxbilibili.com/"}


class XiaohongshuSetting(WebsiteBaseSetting):
"""Represents the Xiaohongshu setting"""

id = 'xiaohongshu'
name = 'Xiaohongshu'
emoji = discore.config.emoji.xiaohongshu
proxies = {"EmbedEZ": "https://embedez.com"}


class IFunnySetting(EmbedEZBaseSetting):
"""Represents the ifunny setting"""

Expand Down Expand Up @@ -1721,6 +1730,7 @@ def __init__(self, interaction: discore.Interaction, view: SettingsView, ctx: Da
MastodonSetting(interaction, view, ctx),
TumblrSetting(interaction, view, ctx),
BilibiliSetting(interaction, view, ctx),
XiaohongshuSetting(interaction, view, ctx),
WeiboSetting(interaction, view, ctx),
ImgurSetting(interaction, view, ctx),
IFunnySetting(interaction, view, ctx),
Expand Down
15 changes: 15 additions & 0 deletions src/websites.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,20 @@ async def get_fixed_url(self) -> tuple[str | None, str | None]:
return fixed_url, self.fixer_name


class XiaohongshuLink(EmbedEZLink):
"""Xiaohongshu website."""

id = 'xiaohongshu'
hypertext_label = 'Xiaohongshu'
is_translation = False
subdomains = None
routes = generate_routes(
"xiaohongshu.com",
{
"/explore/:id": ["xsec_token", "xsec_source"],
})


class IFunnyLink(EmbedEZLink):
"""IFunny website."""

Expand Down Expand Up @@ -945,6 +959,7 @@ async def get_original_url(self) -> tuple[str | None, str | None]:
MastodonLink,
TumblrLink,
BiliBiliLink,
XiaohongshuLink,
IFunnyLink,
YouTubeLink,
ImgurLink,
Expand Down
Loading