print when we fail to fetch a url
This commit is contained in:
parent
c257c13816
commit
d53b17d189
4
randrss
4
randrss
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
random_default=$( shuf -n 1 -i7200-7523)
|
random_default=$( shuf -n 1 -i720-753)
|
||||||
DEFAULT_PER_ITEM="1-$random_default"
|
DEFAULT_PER_ITEM="1-$random_default"
|
||||||
|
|
||||||
echo "Current default sleep seconds range: $DEFAULT_PER_ITEM"
|
echo "Current default sleep seconds range: $DEFAULT_PER_ITEM"
|
||||||
@ -31,6 +31,6 @@ while true ; do
|
|||||||
fi
|
fi
|
||||||
echo "Sleeping for $sleepfor seconds for $url"
|
echo "Sleeping for $sleepfor seconds for $url"
|
||||||
sleep "$sleepfor"
|
sleep "$sleepfor"
|
||||||
torsocks wget "$url" -U "$useragent" -O "$output"
|
torsocks wget "$url" -U "$useragent" -O "$output" || echo "Failed to fetch $url"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user