merge #6410: [bluesky] match common bluesky embed fixes

This commit is contained in:
Mike Fährmann
2024-11-02 18:28:07 +01:00
2 changed files with 26 additions and 1 deletions

View File

@@ -12,7 +12,8 @@ from .common import Extractor, Message
from .. import text, util, exception
from ..cache import cache, memcache
BASE_PATTERN = r"(?:https?://)?(?:(?:www\.)?bsky\.app|main\.bsky\.dev)"
BASE_PATTERN = (r"(?:https?://)?"
r"(?:(?:www\.)?c?bs[ky]y[ex]?\.app|main\.bsky\.dev)")
USER_PATTERN = BASE_PATTERN + r"/profile/([^/?#]+)"

View File

@@ -357,4 +357,28 @@ __tests__ = (
},
},
{
"#url" : "https://cbsky.app/profile/bsky.app/post/3kh5rarr3gn2n",
"#category": ("", "bluesky", "post"),
"#class" : bluesky.BlueskyPostExtractor,
},
{
"#url" : "https://bskye.app/profile/bsky.app/post/3kh5rarr3gn2n",
"#category": ("", "bluesky", "post"),
"#class" : bluesky.BlueskyPostExtractor,
},
{
"#url" : "https://bskyx.app/profile/bsky.app/post/3kh5rarr3gn2n",
"#category": ("", "bluesky", "post"),
"#class" : bluesky.BlueskyPostExtractor,
},
{
"#url" : "https://bsyy.app/profile/bsky.app/post/3kh5rarr3gn2n",
"#category": ("", "bluesky", "post"),
"#class" : bluesky.BlueskyPostExtractor,
},
)