Skip to content

Instantly share code, notes, and snippets.

@ohhdemgirls
Created March 24, 2016 09:50
Show Gist options
  • Save ohhdemgirls/1959ce9be99e6f00f355 to your computer and use it in GitHub Desktop.
Save ohhdemgirls/1959ce9be99e6f00f355 to your computer and use it in GitHub Desktop.
#!/bin/bash
# eroshare.com/igowild.com downloader
# Usage ./eroshare.sh https://eroshare.com/jhocqntr
for LINK in "$@" ;
# download albums & videos
do if [ $(echo "$LINK" | grep "eroshare.com/[A-Za-z0-9]\|igowild.com/[A-Za-z0-9]\|") ]
then URL=$(echo "$LINK" | cut -d'/' -f4) ;
TITLE=$(curl -Ls "$LINK" | grep "<title>.*</title>\|twitter:title\|og:title" | cut -d'"' -f4 | cut -d'>' -f2 | cut -d'<' -f1 | uniq | paste -sd ' ' | sed 's|^|-|') ;
USER=$(curl -Ls "$LINK" | grep -i "avatar avatar-small" | cut -d'"' -f2 | sed "s|\/u\/||g;s|\ ||g") ;
curl -Ls "$LINK" | grep "img src=\|img data-original\|og:image\|source player-id=" | grep -Eo '(//|https:)[^"]*' | uniq | sed 's|^\/\/|https://|g' | grep -v 'cloudfront\|thumb_play' | xargs wget -U Mozilla -c -nv --no-check-certificate -P "$URL$TITLE-$USER" ;
## download user profiles
elif [ $(echo "$LINK" | grep "eroshare.com/u/\|igowild.com/u/") ] ;
then
for ALBUM in $(curl -sL "$LINK" | grep -A1 'id="album-' | grep -Eo '/[^"]*' | sed -e 's|^\/|https://eroshare.com/|g') ;
do URL=$(echo "$ALBUM" | cut -d'/' -f5) ;
TITLE=$(curl -Ls "$ALBUM" | grep "<title>.*</title>\|twitter:title\|og:title" | cut -d'"' -f4 | cut -d'>' -f2 | cut -d'<' -f1 | uniq | paste -sd ' ' | sed 's|^|-|') ;
USER=$(curl -Ls "$ALBUM" | grep -i "avatar avatar-small" | cut -d'"' -f2 | sed "s|\/u\/||g;s|\ ||g") ;
curl -Ls "$LINK" | grep "img src=\|img data-original\|og:image\|source player-id=" | grep -Eo '(//|https:)[^"]*' | uniq | sed 's|^\/\/|https://|g' | grep -v 'cloudfront\|thumb_play' | xargs wget -U Mozilla -c -nv --no-check-certificate -P "$USER/$URL$TITLE" ;
done
else [ $(echo $LINK | grep -v "eroshare.com\|igowild.com") ]
echo "$LINK is not supported" ;
fi ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment