Something fixed
This commit is contained in:
9
grpoppro
9
grpoppro
@@ -11,7 +11,7 @@ menu="fuzzel -d -p "
|
|||||||
#menu="fzf -i --prompt="
|
#menu="fzf -i --prompt="
|
||||||
apiurl="https://coverapi.store"
|
apiurl="https://coverapi.store"
|
||||||
### Curl constants
|
### 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="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"
|
ACCEPT_LANGUAGE="Accept-Language: en-US,en;q=0.5"
|
||||||
CONNECTION="Connection: keep-alive"
|
CONNECTION="Connection: keep-alive"
|
||||||
@@ -96,9 +96,9 @@ function curlRequest {
|
|||||||
"-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_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" \
|
# 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" \
|
||||||
@@ -179,6 +179,10 @@ function basics {
|
|||||||
# Retrieve internal ID
|
# Retrieve internal ID
|
||||||
function getInternalID {
|
function getInternalID {
|
||||||
response="$(curlRequest "$simpleurl")"
|
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'></div>"; then
|
if echo "$response" | grep -q "id='el-content'></div>"; then
|
||||||
message "No file found"
|
message "No file found"
|
||||||
exit 0
|
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
|
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
|
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
|
getMovieStreamUrl "$internalid" # Gets the internal id and performs one request to get the stream url
|
||||||
|
title="${title//%20/ }"
|
||||||
message "Loading $title"
|
message "Loading $title"
|
||||||
play # It uses mpv to stream the file
|
play # It uses mpv to stream the file
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user