diff --git a/movies/movies b/movies/movies index 32acbc1..2de045f 100755 --- a/movies/movies +++ b/movies/movies @@ -47,7 +47,8 @@ checkInternet() getMovieInfo() { apiKey=946f500a # try not to abuse this it is a key that came from the ruby-scripts repo I link to. - movie="$1+$2+$3+$4+$5+$6+$7+$8+$9" ## format the inputs to use for the api + movie=$(echo $1 $2 $3 $4 $5 $6 $7 $8 $9 | tr " " + ) ## format the inputs to use for the api + export PYTHONIOENCODING=utf8 #necessary for python in some cases movieInfo=$(httpGet "http://www.omdbapi.com/?t=$movie&apikey=$apiKey") > /dev/null # query the server and get the JSON response checkResponse=$(echo $movieInfo | python -c "import sys, json; print json.load(sys.stdin)['Response']") if [[ $checkResponse == "False" ]];then { echo "No movie found" ; return 1 ;} fi ## check to see if the movie was found