breakthrough with the increment
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17m20s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17m20s
This commit is contained in:
+83
@@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
|
||||
#install required packages
|
||||
apk add curl wget
|
||||
|
||||
#named argument generation
|
||||
skip_searching_gallery="${skip_searching_gallery:-false}"
|
||||
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
if [[ $1 == "--"* ]]; then
|
||||
v="${1/--/}"
|
||||
declare "$v"="$2"
|
||||
shift
|
||||
fi
|
||||
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"
|
||||
PROXY_HTTP="http://gluetun-svc.gluetun.svc:8888"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/eiby-shine/"
|
||||
#pornstars="eiby-shine"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/?q=shy+imp"
|
||||
#pornstars="shy-imp"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/gloria-sol/"
|
||||
#pornstars="gloria-sol"
|
||||
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/becky-summer"
|
||||
#pornstars="becky-summer"
|
||||
|
||||
|
||||
#clear files beforehand
|
||||
|
||||
echo "Pornstar: "$pornstars
|
||||
echo "URL: "$BASE_URL
|
||||
|
||||
mkdir -p $DESTINATION_FOLDER/$pornstars
|
||||
|
||||
if [[ $skip_searching_gallery == true ]]; then
|
||||
echo "not looping through galleries"
|
||||
echo "using existing file instead"
|
||||
#because we need to keep the file $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt with the existing URL , in this condition,
|
||||
#no deletion of this file
|
||||
echo $external_gallery > $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
else
|
||||
echo "looping through galleries"
|
||||
#because we will re-generate this file, can be emptied
|
||||
echo "" > $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_command $f | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://cdni.pornpics.com/1280" >> $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
echo $f
|
||||
done
|
||||
|
||||
|
||||
for g in $(cat $DESTINATION_FOLDER/$pornstars-image_to_download.txt ); do
|
||||
$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
|
||||
exit 0
|
||||
Reference in New Issue
Block a user