reduced load

This commit is contained in:
Stefen Auris 2023-07-26 16:07:22 -04:00
parent de63dee755
commit 1841a7fe6d

View file

@ -1,15 +1,16 @@
#!/bin/bash #!/bin/bash
N=3 N=1
rm ~/twit_error.txt rm ~/twit_error.txt
cd $HOME/gallery-dl/twitter cd $HOME/gallery-dl/twitter
echo ">>> Begin Downloads"
for i in */; do for i in */; do
echo ">> $i" echo ">> $i"
(gallery-dl --sleep 0.8-3 --abort 3 "https://twitter.com/$i" || echo "$i" >> ~/twit_error.txt) & (gallery-dl --sleep 3 --abort 3 "https://twitter.com/$i" || echo "$i" >> ~/twit_error.txt) &
if [[ $(jobs -r -p | wc -l) -ge $N ]]; then if [[ $(jobs -r -p | wc -l) -ge $N ]]; then
wait -n wait -n
fi fi
done done
echo ">>> Updating Retweets" echo ">>> Updating Retweets"
gallery-dl --abort 3 --sleep 0.5-2 -o retweets=true "https://twitter.com/stefenauris" gallery-dl --abort 3 --sleep 2 -o retweets=true "https://twitter.com/stefenauris"
gallery-dl --abort 3 --sleep 0.5-2 -o retweets=true "https://twitter.com/DaybreakHero" gallery-dl --abort 3 --sleep 2 -o retweets=true "https://twitter.com/DaybreakHero"
wait wait