From 0dd4d93c9ac44d52e7bbe6a76fde3d56b7efa4e6 Mon Sep 17 00:00:00 2001 From: konsthol Date: Tue, 31 Dec 2024 19:36:39 +0200 Subject: [PATCH] Something fixed --- grpoppro | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grpoppro b/grpoppro index 08cd598..a73a923 100755 --- a/grpoppro +++ b/grpoppro @@ -11,7 +11,7 @@ menu="fuzzel -d -p " #menu="fzf -i --prompt=" apiurl="https://coverapi.store" ### Curl constants -USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0" +USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" ACCEPT="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" ACCEPT_LANGUAGE="Accept-Language: en-US,en;q=0.5" CONNECTION="Connection: keep-alive" @@ -96,9 +96,9 @@ function curlRequest { "-H $custom_accept" "-H $ACCEPT_LANGUAGE" "-H $CONNECTION" - "-H $UP_IN_REQ" "$@" ) + # "-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" \ @@ -179,6 +179,10 @@ function basics { # Retrieve internal ID function getInternalID { response="$(curlRequest "$simpleurl")" + if echo "$response" | grep -q 404; then + message "Non valid response" + exit 0 + fi if echo "$response" | grep -q "id='el-content'>"; then message "No file found" exit 0 @@ -465,6 +469,7 @@ if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ basics "$1" # Gets the title, performs one request to imdb and gets the complete url getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist getMovieStreamUrl "$internalid" # Gets the internal id and performs one request to get the stream url + title="${title//%20/ }" message "Loading $title" play # It uses mpv to stream the file exit 0