-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstacreep.sh
41 lines (41 loc) · 857 Bytes
/
instacreep.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
savepath=""
creep(){
username="$1"
if cd "$savepath"
then
if [[ -d "${username}" ]]
then
echo "${username} exists, crawling."
else
mkdir "${username}"
fi
if cd "${username}"
then
mapfile -t links < <(wget --quiet -O - "https://www.instagram.com/${username}/media" | sed -e 's/standard/\n/g' | sed -e 's/"}}.*//g' -e 's/.*"//g'| grep -v status)
for i in "${links[@]}"
do
wget --quiet -nc "${i%%\?*}"
done
fi
else
echo "INSTACREEP FAILED"
fi
}
while true
do
if cd "$savepath"
then
mapfile -t usernames < <(cat instacreep.txt)
for i in "${usernames[@]}"
do
creep "$i"
done
else
echo "COULD NOT ENTER DIRECTORY"
fi
let random=$RANDOM%360
let sleepy=45+$random
echo "sleeping $sleepy on $(date)"
sleep $sleepy
done