check if we need http proxy or not
This commit is contained in:
+14
-3
@@ -16,6 +16,17 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
#check if we will use a HTTP proxy or not
|
||||
|
||||
if [[ -z $http_proxy ]]; then
|
||||
echo "not using proxy"
|
||||
curl_command="curl"
|
||||
else
|
||||
echo "using proxy"
|
||||
curl_command="curl -x $http_proxy"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#dowload from https://www.pornpics.com/pornstars/eiby-shine/
|
||||
DESTINATION_FOLDER="/data"
|
||||
@@ -45,20 +56,20 @@ else
|
||||
echo "looping through galleries"
|
||||
#because we will re-generate this file, can be emptied
|
||||
echo "" > $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
curl -x $PROXY_HTTP -s $BASE_URL | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://www.pornpics.com/galleries/" |sort -u >> $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
$curl_command -s $BASE_URL | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://www.pornpics.com/galleries/" |sort -u >> $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
fi
|
||||
|
||||
echo "" > $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
|
||||
|
||||
for f in $(cat $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt ); do
|
||||
curl -x $PROXY_HTTP $f | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://cdni.pornpics.com/" >> $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
$curl_command $f | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://cdni.pornpics.com/" >> $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
echo $f
|
||||
done
|
||||
|
||||
|
||||
for g in $(cat $DESTINATION_FOLDER/$pornstars-image_to_download.txt ); do
|
||||
curl -x $PROXY_HTTP -O --output-dir $DESTINATION_FOLDER/$pornstars $g
|
||||
$curl_command -O --output-dir $DESTINATION_FOLDER/$pornstars $g
|
||||
# wget -e use_proxy=yes -e http_proxy=$PROXY_HTTP $g -P $DESTINATION_FOLDER/$pornstars
|
||||
echo $g
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user