Compare commits

...

2 Commits

Author SHA1 Message Date
HobbyistDev
aa9f5d4b39
Set numerical as \d instead 0-9
Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com>
2024-12-14 06:53:29 +08:00
HobbyistDev
1aab655030
Set explore and discovery item as non-capture group
Co-authored-by: N/Ame <173015200+grqz@users.noreply.github.com>
2024-12-14 06:52:54 +08:00

View File

@ -10,7 +10,7 @@ from ..utils.traversal import traverse_obj
class XiaoHongShuIE(InfoExtractor):
_VALID_URL = r'https?://www\.xiaohongshu\.com/(explore|discovery/item)/(?P<id>[\da-f]+)'
_VALID_URL = r'https?://www\.xiaohongshu\.com/(?:explore|discovery/item)/(?P<id>[\da-f]+)'
IE_DESC = '小红书'
_TESTS = [{
'url': 'https://www.xiaohongshu.com/explore/6411cf99000000001300b6d9',
@ -34,7 +34,7 @@ class XiaoHongShuIE(InfoExtractor):
'uploader_id': '63439913000000001901f49a',
'duration': 28.073,
'description': '#广州[话题]# #深圳[话题]# #香港[话题]# #街头采访[话题]# #是你喜欢的类型[话题]#',
'thumbnail': r're:https?://sns-webpic-qc\.xhscdn\.com/\d+/[0-9a-f]+/[^/]+',
'thumbnail': r're:https?://sns-webpic-qc\.xhscdn\.com/\d+/[\da-f]+/[^/]+',
'tags': ['广州', '深圳', '香港', '街头采访', '是你喜欢的类型'],
},
}]