Skip to content

Commit

Permalink
updating changed CDN url
Browse files Browse the repository at this point in the history
  • Loading branch information
gmn committed Aug 13, 2018
1 parent 37e1d73 commit 202cab0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions 4chget
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ elif [ "k${PAGE}" == "k" ]; then
exit 0
fi

#was
IMAGE_HOST='i.4cdn.org'
#is
IMAGE_HOST='is2.4chan.org'

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`
URLS_BIG=`echo $PAGE | tr ' ' '\n' | grep -E \/\/${IMAGE_HOST}\/[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 @@ -128,8 +132,8 @@ do
echo "$line" | grep -q "http" || line='http:'$line
echo "$next_line" | grep -q "http" || next_line='http:'$next_line

pic=`echo $line | sed -r 's^http:\/\/i.4cdn.org\/[a-z]+\/^^g'`
next_pic=`echo $next_line | sed -r 's^http:\/\/i.4cdn.org\/[a-z]+\/^^g'`
pic=`echo $line | sed -r 's^http:\/\/'${IMAGE_HOST}'\/[a-z]+\/^^g'`
next_pic=`echo $next_line | sed -r 's^http:\/\/'${IMAGE_HOST}'\/[a-z]+\/^^g'`

if [ "$VERBOSE" ]; then
echo
Expand Down

0 comments on commit 202cab0

Please sign in to comment.