Skip to content

Commit

Permalink
Merge pull request #1 from greato/master
Browse files Browse the repository at this point in the history
fix regex
  • Loading branch information
gmn committed Sep 25, 2014
2 parents b3fad91 + 1b1520c commit 7713312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 4chget
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if echo "$PAGE" | grep -q "404 Not Found"; then
fi


URLS_BIG=`echo $PAGE | tr ' ' '\n' | grep -E \/\/i.4cdn.org\/[a-z]+\/[0-9]*\.[jpg][pni][gf] | sed -e 's/href="//g' -e 's/"//g' | uniq`
URLS_BIG=`echo $PAGE | tr ' ' '\n' | grep -E \/\/i.4cdn.org\/[a-z]+\/[0-9]*\.[jpg\|png\|gif\|webm] | sed -e 's/href="//g' -e 's/"//g' | uniq`
if [ $(echo $URLS_BIG | wc -l | awk '{print $1}') -le 2 ]; then
URLS_BIG=`echo $URLS_BIG | tr ' ' '\n'`
fi
Expand Down Expand Up @@ -97,7 +97,7 @@ fi
function get_line() {
local line=$1
if $HAVE_WGET; then
wget -c $line
wget -qc $line &
else
curl -C - $line -o $pic
fi
Expand Down

0 comments on commit 7713312

Please sign in to comment.