Your heart's been aching but you're too shy to say it
This commit is contained in:
71
grpoppro
71
grpoppro
@@ -18,12 +18,12 @@ CONNECTION="Connection: keep-alive"
|
|||||||
UP_IN_REQ="Upgrade-Insecure-Requests: 1"
|
UP_IN_REQ="Upgrade-Insecure-Requests: 1"
|
||||||
### End of curl constants
|
### End of curl constants
|
||||||
player="mpv"
|
player="mpv"
|
||||||
|
# --no-load-scripts \
|
||||||
MPV_OPTS='--vo=gpu \
|
MPV_OPTS='--vo=gpu \
|
||||||
--gpu-api=opengl \
|
--gpu-api=opengl \
|
||||||
--opengl-es=yes \
|
--opengl-es=yes \
|
||||||
--msg-level=all=no \
|
--msg-level=all=no \
|
||||||
--really-quiet \
|
--really-quiet \
|
||||||
--no-load-scripts \
|
|
||||||
--profile=sw-fast \
|
--profile=sw-fast \
|
||||||
--no-ytdl \
|
--no-ytdl \
|
||||||
--http-header-fields="User-Agent: '"$USER_AGENT"'" \
|
--http-header-fields="User-Agent: '"$USER_AGENT"'" \
|
||||||
@@ -66,19 +66,64 @@ function curlRequest {
|
|||||||
# Dynamically shift the total number of times needed
|
# Dynamically shift the total number of times needed
|
||||||
shift $((shifts - 1))
|
shift $((shifts - 1))
|
||||||
|
|
||||||
response="$(curl -s -L \
|
# response="$(curl -s -L \
|
||||||
-c "$GRPOPPRO_COOKIE_FILE" \
|
# -c "$GRPOPPRO_COOKIE_FILE" \
|
||||||
-b "$GRPOPPRO_COOKIE_FILE" \
|
# -b "$GRPOPPRO_COOKIE_FILE" \
|
||||||
"$url" \
|
# "$url" \
|
||||||
--compressed \
|
# --compressed \
|
||||||
-X "$custom_method" \
|
# -X "$custom_method" \
|
||||||
-A "$USER_AGENT" \
|
# -A "$USER_AGENT" \
|
||||||
-H "$custom_accept" \
|
# -H "$custom_accept" \
|
||||||
-H "$ACCEPT_LANGUAGE" \
|
# -H "$ACCEPT_LANGUAGE" \
|
||||||
-H "$CONNECTION" \
|
# -H "$CONNECTION" \
|
||||||
-H "$UP_IN_REQ" \
|
# -H "$UP_IN_REQ" \
|
||||||
|
# "$@"
|
||||||
|
# )"
|
||||||
|
|
||||||
|
LOG_FILE="/tmp/grpoppro_curl_commands.log"
|
||||||
|
|
||||||
|
local curl_command=(
|
||||||
|
"curl"
|
||||||
|
"-s"
|
||||||
|
"-L"
|
||||||
|
"-c $GRPOPPRO_COOKIE_FILE"
|
||||||
|
"-b $GRPOPPRO_COOKIE_FILE"
|
||||||
|
"$url"
|
||||||
|
"--compressed"
|
||||||
|
"-X"
|
||||||
|
"$custom_method"
|
||||||
|
"-A $USER_AGENT"
|
||||||
|
"-H $custom_accept"
|
||||||
|
"-H $ACCEPT_LANGUAGE"
|
||||||
|
"-H $CONNECTION"
|
||||||
|
"-H $UP_IN_REQ"
|
||||||
"$@"
|
"$@"
|
||||||
)"
|
)
|
||||||
|
|
||||||
|
# log_string=$(printf "curl -s -L \n -c %s \n -b %s \n %s \n --compressed \n -X %s \n -A %s \n -H %s \n -H %s \n -H %s \n -H %s \n %s \n" \
|
||||||
|
# "$GRPOPPRO_COOKIE_FILE" \
|
||||||
|
# "$GRPOPPRO_COOKIE_FILE" \
|
||||||
|
# "$url" \
|
||||||
|
# "$custom_method" \
|
||||||
|
# "$USER_AGENT" \
|
||||||
|
# "$custom_accept" \
|
||||||
|
# "$ACCEPT_LANGUAGE" \
|
||||||
|
# "$CONNECTION" \
|
||||||
|
# "$UP_IN_REQ" \
|
||||||
|
# "$@")
|
||||||
|
|
||||||
|
{
|
||||||
|
echo -e "<===========================\n"
|
||||||
|
echo "Called by: ${FUNCNAME[1]}"
|
||||||
|
echo ""
|
||||||
|
echo -e "$(date '+%d-%m-%Y %H:%M:%S') -> ${curl_command[5]}\n"
|
||||||
|
# echo -e "$log_string"
|
||||||
|
printf "%s\n" "${curl_command[@]}"
|
||||||
|
echo ""
|
||||||
|
echo -e "===========================>\n"
|
||||||
|
} >> "$LOG_FILE"
|
||||||
|
|
||||||
|
response=$("${curl_command[@]}")
|
||||||
|
|
||||||
exit_code="$?"
|
exit_code="$?"
|
||||||
if [[ "$exit_code" -ne 0 ]]; then
|
if [[ "$exit_code" -ne 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user