mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 15:07:17 +08:00
@@ -74,11 +74,12 @@ class XHS:
|
||||
VERSION_MAJOR = VERSION_MAJOR
|
||||
VERSION_MINOR = VERSION_MINOR
|
||||
VERSION_BETA = VERSION_BETA
|
||||
LINK = compile(r"https?://www\.xiaohongshu\.com/explore/\S+")
|
||||
USER = compile(r"https?://www\.xiaohongshu\.com/user/profile/[a-z0-9]+/\S+")
|
||||
SHARE = compile(r"https?://www\.xiaohongshu\.com/discovery/item/\S+")
|
||||
SHORT = compile(r"https?://xhslink\.com/[^\s\"<>\\^`{|},。;!?、【】《》]+")
|
||||
LINK = compile(r"(?:https?://)?www\.xiaohongshu\.com/explore/\S+")
|
||||
USER = compile(r"(?:https?://)?www\.xiaohongshu\.com/user/profile/[a-z0-9]+/\S+")
|
||||
SHARE = compile(r"(?:https?://)?www\.xiaohongshu\.com/discovery/item/\S+")
|
||||
SHORT = compile(r"(?:https?://)?xhslink\.com/[^\s\"<>\\^`{|},。;!?、【】《》]+")
|
||||
ID = compile(r"(?:explore|item)/(\S+)?\?")
|
||||
ID_USER = compile(r"user/profile/[a-z0-9]+/(\S+)?\?")
|
||||
__INSTANCE = None
|
||||
CLEANER = Cleaner()
|
||||
|
||||
@@ -286,6 +287,8 @@ class XHS:
|
||||
for i in links:
|
||||
if j := self.ID.search(i):
|
||||
ids.append(j.group(1))
|
||||
elif j := self.ID_USER.search(i):
|
||||
ids.append(j.group(1))
|
||||
return ids
|
||||
|
||||
async def __deal_extract(
|
||||
|
||||
Reference in New Issue
Block a user