>>8
Although I'm sure you could come up with this ugly bash cocktail of
sed,
awk and
cut yourself, here:
This will scan the front page every minute, looking for all messages with milkribs, furpastica or L33t as tripcodes and reply with "you're an anus"
#/bin/bash
# replace sed -n '/postertrip\">/,/<\/span>/p'
# with sed -n '/postername\">/,/<\/span>/p' to grep something in the name field
# with sed -n '/<blockquote>/,/<\/blockquote>/p' to grep something in the message block
com="You're an anus"
while true ; do
last_threads=$(curl --silent http://dis.4chan.org/lounge/subject.txt | sed 18q | awk -F'<>' '{print $4"/"$5}')
for thread in $last_threads ; do
t_number=$(echo $thread | awk '{print $1}')
if curl --silent "http://dis.4chan.org/read/lounge/"$t_number | sed -n '/postertrip\">/,/<\/span>/p' | grep -E -s -q -i 'Milkribs|futuristipastica|L33t' ; then
id=$(echo $t_number | awk -F'/' '{print $1}')
anus=$(echo $t_number | awk -F'/' '{print $2}')
curl -A "Mozilla/5.0" -F bbs=lounge -F id=$id -F lol what 2 -F meiru="sage" -F kotehan="Anonymous" -F com=">>$anus
$com" -F email="'" http://dis.4chan.org/post > /dev/null 2>&1
sleep 5
fi
done
sleep 180
done
You've got a skeleton that you can tweak. Have fun.