Skip to content

Commit 1bf1e72

Browse files
committed
fix(bilibili): share link pattern
1 parent ed0c984 commit 1bf1e72

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/plugins/bilibili/plugins/_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def raise_for_status(resp: Response) -> Any:
4242
base_url="https://api.bilibili.com/x/share",
4343
)
4444

45-
URL_PATTERN = re.compile(r"https://b23\.tv/\w+")
45+
URL_PATTERN = re.compile(
46+
r"http[s]?://"
47+
r"(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|"
48+
r"(?:%[0-9a-fA-F][0-9a-fA-F]))+"
49+
)
4650

4751

4852
async def get_share_click(oid: Any, origin: str, share_id: str) -> str:

0 commit comments

Comments
 (0)