POST https://www.sui.com/report.rmi
content-type: application/x-www-form-urlencoded; charset=UTF-8
cookie: XXX
m=compare&beginDate=2000.1.1&endDate=2022.03.25&cardId=164459304268&page=1
Or
curl -d 'm=compare&beginDate=2000.1.1&endDate=2022.03.25&cardId=164459304268&page=1' \
-H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
-H 'cookie: COOKIE' \
https://www.sui.com/report.rmi
#!/bin/bash
while read -r p; do
date_str=$(date -d "@$(("$p"/1000))" '+%Y-%-m-%-d')
curl -d "m=detail&date=${date_str}&cardId=164459304268" \
-H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
-H 'cookie: COOKIE' \
https://www.sui.com/report.rmi
echo
done < ./time | tee output
cat output | jq '[.[]] | map([(.name | if . == "支出" then 2 else (if . == "收入" then 1 else (if . == "余额变 更" then 3 else 4 end) end) end), .money, .memo]) | .[]'
我真的用这些操作处理不下去了,只好祭出正经语言了:https://github.com/bczhc/web-scraper/tree/master/suishouji