This commit is contained in:
2024-12-30 21:33:29 +02:00
parent 5aa5d1f46f
commit 2776baba9f

View File

@@ -27,7 +27,7 @@ ACCEPT="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp
ACCEPT_LANGUAGE="Accept-Language: en-US,en;q=0.5" ACCEPT_LANGUAGE="Accept-Language: en-US,en;q=0.5"
CONNECTION="Connection: keep-alive" CONNECTION="Connection: keep-alive"
UP_IN_REQ="Upgrade-Insecure-Requests: 1" UP_IN_REQ="Upgrade-Insecure-Requests: 1"
### Enf of curl constants ### End of curl constants
## End of definitions ## End of definitions
# Display a message # Display a message
@@ -108,7 +108,7 @@ function getInternalID {
# Retrieve movie stream URL # Retrieve movie stream URL
function getMovieStreamUrl { function getMovieStreamUrl {
PHPSESSID="$(grep 'PHPSESSID' "$GRPOPPRO_COOKIE_FILE" | awk '{print $NF}')" PHPSESSID="$(grep 'PHPSESSID' "$GRPOPPRO_COOKIE_FILE" | awk '{print $NF}')"
streamurl="$(curl -s -L -c "$GRPOPPRO_COOKIE_FILE" -b "$GRPOPPRO_COOKIE_FILE" "$apiurl/engine/ajax/controller.php" --compressed -X POST \ response="$(curl -s -L -c "$GRPOPPRO_COOKIE_FILE" -b "$GRPOPPRO_COOKIE_FILE" "$apiurl/engine/ajax/controller.php" --compressed -X POST \
-A "$USER_AGENT" \ -A "$USER_AGENT" \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \ -H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H "$ACCEPT_LANGUAGE" \ -H "$ACCEPT_LANGUAGE" \
@@ -125,9 +125,9 @@ function getMovieStreamUrl {
-H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin' \ -H 'Sec-Fetch-Site: same-origin' \
-H 'TE: trailers' \ -H 'TE: trailers' \
--data-raw "mod=players&news_id=$internalid" \ --data-raw "mod=players&news_id=$internalid"
| sed 's/\\//g' | grep -oP 'file:"\K[^"]+'
)" )"
streamurl="$(echo "$response" | sed 's/\\//g' | grep -oP 'file:"\K[^"]+')"
} }
# Stream the video # Stream the video