看板 Anonymous
作者 江湖傳言.
標題 Re: 2/9洗ㄐㄐ紀錄
時間 2026-02-09 Mon. 20:30:55
其實我比較在意環仔
--
試聴
★ お気に入り登録
--
#!/bin/dash
set -x
exec 2>ptt-curl_log
while :
do
rm main time.unix time.human time.human2 index.html
i=1
while [ $i -le 3 ]
do
if curl -sfO 'https://www.ptt.cc/bbs/ALLPOST/index.html'
then
break
else
echo "Retry $i/3"
fi
i=$((i+1))
sleep 1
done
grep 'a.*href.*bbs.*M.*html' index.html|sed 's/<a href.*M\.//'|sed 's/\.A\..*//' > time.unix
while read -r line
do
date -d@$line >> time.human
done<time.unix
cat time.human|sed 's/CST.*$//' > time.human2
grep 'a.*href.*bbs.*M.*html' index.html \
| sed 's/.*html">//' | sed 's/.*html">//' |sed 's/<\/a>$//' > main
paste time.human2 main
echo
date
echo
sleep 600
done
tmp(){
curl --trace /tmp/curl.log --retry 3 -O 'https://www.ptt.cc/bbs/ALLPOST/index.html'
a=$?
if [ $a -ne 0 ]
then
break
fi
echo $a >> last.time
}
※ 編輯: 江湖傳言 時間: 2026-02-09 22:27:25 (台灣)
※ 同主題文章:
… ×2531
Re: 2/9洗ㄐㄐ紀錄
02-09 20:30 江湖傳言.
… ×284