Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- cd /home/tesla/dzRSS
- for section in 0 1 2 3
- do
- echo "sleeping before wgetting"
- sleep 10
- wget -q http://www.dniprowazirka.com.ua/list.php?r=$section -O -|grep -A 3 -B 3 "bulo_txt"|tr -d "\r\n"|sed -e 's/'"Далі..."'/\n/g'| while read line; do
- title=$(echo $line|awk -F 'bulo_txt>' 'BEGIN{RS="</span"; OFS="\n"; ORS=""} {print $2}')
- url=$(echo $line|awk -F '<a href=' 'BEGIN{RS="><"; OFS="\n"; ORS=""} {print $2}')
- titleshort=$(echo $title|iconv -f utf-8 -t cp1251|cut -c1-96|iconv -f cp1251 -t utf-8)
- if [ ! -e $url ]
- then
- echo "sleeping before twitting"
- sleep 15
- echo "twitting"
- ./tweetit.py "$titleshort http://dniprowazirka.com.ua/$url"
- touch $url
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement