Skip to content

Commit

Permalink
api/tests: add xiaohongshu tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wukko committed Jan 20, 2025
1 parent ed8f435 commit ad6f29a
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions api/src/util/tests/xiaohongshu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[
{
"name": "long link video",
"url": "https://www.xiaohongshu.com/discovery/item/6789065900000000210035fc?source=webshare&xhsshare=pc_web&xsec_token=CBustnz_Twf1BSybpe5-D-BzUb-Bx28DPLb418TN9S9Kk&xsec_source=pc_share",
"params": {},
"expected": {
"code": 200,
"status": "tunnel"
}
},
{
"name": "picker with multiple live photos",
"url": "https://www.xiaohongshu.com/explore/67847fa1000000000203e6ed?xsec_token=CBzyP7Y44PPpsM20lgxqrIIJMHqOLemusDsRcmsX0cTpk",
"params": {},
"expected": {
"code": 200,
"status": "picker"
}
},
{
"name": "one photo",
"url": "https://www.xiaohongshu.com/explore/6788b56200000000210008c8?xsec_token=CBSDiWU4N-DgirHrOVbIWrlKfUNFHKwm-Wsjqz7dIMc_k",
"params": {},
"expected": {
"code": 200,
"status": "tunnel"
}
},
{
"name": "short link, might expire eventually",
"url": "https://xhslink.com/a/czn4z6c1tic4",
"canFail": true,
"params": {},
"expected": {
"code": 200,
"status": "tunnel"
}
},
{
"name": "wrong note id",
"url": "https://www.xiaohongshu.com/discovery/item/6789065911100000210035fc?source=webshare&xhsshare=pc_web&xsec_token=CBustnz_Twf1BSybpe5-D-BzUb-Bx28DPLb418TN9S9Kk&xsec_source=pc_share",
"params": {},
"expected": {
"code": 400,
"status": "error"
}
},
{
"name": "short link, wrong id",
"url": "https://xhslink.com/a/aaaaaa",
"canFail": true,
"params": {},
"expected": {
"code": 400,
"status": "error"
}
}
]

0 comments on commit ad6f29a

Please sign in to comment.