顯示廣告
隱藏 ✕
看板 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 (台灣)
※ 同主題文章:
  06-21 19:57 聰明. □ 6/21紀錄
  … ×2529
  02-06 21:25 聰明. □ 2/6紀錄
  02-06 21:26 空中wifi. Re 2/6紀錄
  02-13 16:23 聰明. □ 2/13紀錄
  … ×278
※ 看板: Anonymous 文章推薦值: 0 目前人氣: 0 累積人氣: 6 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇