Fixed some shit

This commit is contained in:
2024-12-18 18:36:23 +02:00
parent 850aece8b4
commit eb8260fc9c

View File

@@ -69,7 +69,12 @@ function getInternalID() {
} }
function getIMDBID() { 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 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" [[ "$INTERACTIVE" == "on" ]] && notify-send -t 2000 "Film or show not found in imdb" || echo -e "\n\tFilm or show not found in imdb"
exit exit