check if we need http proxy or not

This commit is contained in:
2025-05-15 19:12:58 +00:00
parent 94d3c48e38
commit 5be4a4dcf2
+14 -3
View File
@@ -16,6 +16,17 @@ while [ $# -gt 0 ]; do
shift shift
done 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/ #dowload from https://www.pornpics.com/pornstars/eiby-shine/
DESTINATION_FOLDER="/data" DESTINATION_FOLDER="/data"
@@ -45,20 +56,20 @@ else
echo "looping through galleries" echo "looping through galleries"
#because we will re-generate this file, can be emptied #because we will re-generate this file, can be emptied
echo "" > $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt 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 fi
echo "" > $DESTINATION_FOLDER/$pornstars-image_to_download.txt echo "" > $DESTINATION_FOLDER/$pornstars-image_to_download.txt
for f in $(cat $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt ); do 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 echo $f
done done
for g in $(cat $DESTINATION_FOLDER/$pornstars-image_to_download.txt ); do 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 # wget -e use_proxy=yes -e http_proxy=$PROXY_HTTP $g -P $DESTINATION_FOLDER/$pornstars
echo $g echo $g
done done