From 82e5b8877358cb27ff21094a441fe79c2f182d70 Mon Sep 17 00:00:00 2001 From: konsthol Date: Tue, 31 Dec 2024 18:39:00 +0200 Subject: [PATCH] Your heart's been aching but you're too shy to say it --- grpoppro | 71 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 13 deletions(-) diff --git a/grpoppro b/grpoppro index f2a197d..08cd598 100755 --- a/grpoppro +++ b/grpoppro @@ -18,12 +18,12 @@ CONNECTION="Connection: keep-alive" UP_IN_REQ="Upgrade-Insecure-Requests: 1" ### End of curl constants player="mpv" + # --no-load-scripts \ MPV_OPTS='--vo=gpu \ --gpu-api=opengl \ --opengl-es=yes \ --msg-level=all=no \ --really-quiet \ - --no-load-scripts \ --profile=sw-fast \ --no-ytdl \ --http-header-fields="User-Agent: '"$USER_AGENT"'" \ @@ -66,19 +66,64 @@ function curlRequest { # Dynamically shift the total number of times needed shift $((shifts - 1)) - response="$(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" \ + # response="$(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_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="$?" if [[ "$exit_code" -ne 0 ]]; then