From eb8260fc9c687f62d32261955defd22dc9967f7c Mon Sep 17 00:00:00 2001 From: konsthol Date: Wed, 18 Dec 2024 18:36:23 +0200 Subject: [PATCH] Fixed some shit --- grpoppro | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/grpoppro b/grpoppro index d4bdb9e..11a36a9 100755 --- a/grpoppro +++ b/grpoppro @@ -69,7 +69,12 @@ function getInternalID() { } function getIMDBID() { - imdbid="$(curl -s "http://imdb.konsthol.eu/find?q=$title" | grep -io ' href=['"'"'"][^"'"'"']*['"'"'"]' | grep title | head -n1 | sed -e 's/^ //' -e 's/href="\/title\///' -e 's/"//')" + imdbid="$(curl -s -L -c "$GRPOPPRO_COOKIE_FILE" -b "$GRPOPPRO_COOKIE_FILE" \ + -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0" \ + -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" \ + "https://www.imdb.com/find/?q=$title" | grep -io ' href=['"'"'"][^"'"'"']*['"'"'"]' | grep 'href="/title/'| head -n1 | sed -e 's/href="\/title\///' -e 's/\/?.*//' -e 's/^ //' + )" + # imdbid="$(curl -s "http://imdb.konsthol.eu/find?q=$title" | grep -io ' href=['"'"'"][^"'"'"']*['"'"'"]' | grep title | head -n1 | sed -e 's/^ //' -e 's/href="\/title\///' -e 's/"//')" if ! [[ "$imdbid" == *"tt"* ]]; then [[ "$INTERACTIVE" == "on" ]] && notify-send -t 2000 "Film or show not found in imdb" || echo -e "\n\tFilm or show not found in imdb" exit