Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved on script with aria2c #93

Merged
merged 3 commits into from
Mar 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions get_latest_dumps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
#!/bin/bash
#set -xv

USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22"
Expand All @@ -13,8 +13,19 @@ TEST=""

echo "" > $D_TMP

for f in `wget -c --user-agent="$USER_AGENT" --header="$ACCEPT" -qO- $D_URL_LIST | grep -Eio "$D_PATTERN" | sort | uniq | tail -n 4` ; do
echo $D_URL_DIR$f >> $D_TMP
for f in $(wget -c --user-agent="$USER_AGENT" --header="$ACCEPT" \
-qO- $D_URL_LIST | grep -Eio "$D_PATTERN" | sort | uniq | tail -n 4) ; do
echo $D_URL_DIR$f >> $D_TMP
done

wget -c --user-agent="$USER_AGENT" --header="$ACCEPT" --no-clobber --input-file=$D_TMP $TEST --progress=bar
if ! type "aria2c" > /dev/null; then
wget -c --user-agent="$USER_AGENT" --header="$ACCEPT" --no-clobber \
--input-file=$D_TMP $TEST --show-progress --progress=bar
else
IFS='
'

for f in $(cat $D_TMP); do
aria2c -c "$f"
done
fi