Benutzer-Werkzeuge

Webseiten-Werkzeuge

A PCRE internal error occured. This might be caused by a faulty plugin

imdb-abfrage

====== IMDB-Abfrage ====== alternativ kann man sich die IMDB in TEXT-Form lokal installieren: * [[http://www.imdb.com/interfaces]] * [[ftp://ftp.fu-berlin.de/misc/movies/database/tools/]] * [[ftp://ftp.fu-berlin.de/misc/movies/database/tools/moviedb-3.24.tar.gz]] ===== per SHELL-Skript ===== Dieses Skript fragt die IMDB ab und gibt alle Treffer aus, bei denen der eingegebene Titel mit dem ausgegebenen übereinstimmt. Das technische Wissen für die Umsetzung, stammt von dieser Seite hier: * [[http://stackoverflow.com/questions/1966503/does-imdb-provide-an-api]] <file> #!/bin/bash #==============================================================================# # # Mit diesem Skript kann man Film-Titel in der IMDB suchen. # Die Besonderheit dieses Skripts liegt darin, dass es alle Ausgaben, bei dem # der Titel mit dem Suchbegriff übereinstimmt, aus. # #==============================================================================# FILMNAME="${@}" SUCHNAME="$(echo "${FILMNAME}" | sed 's/ /+/g')" TEMP="/tmp/IMDB_dump.txt" #------------------------------------------------------------------------------# if [ -z "${1}" ] ; then echo "${0} [Film-Titel]" echo "${0} matrix" exit fi #------------------------------------------------------------------------------# rm -f ${TEMP} wget -O ${TEMP} "http://www.imdb.com/xml/find?json=1&q=${SUCHNAME}" AUSGABE="$(cat ${TEMP} | sed 's#[{]#|{#g' | tr -s '[|]' '\n' | fgrep -v '"title":""' | fgrep '{ "id":"' | sed 's/[}][,]$//;s/[{]//;s/:/=/g')" TREFFERANZAHL="$(echo "${AUSGABE}" | wc -l)" echo "Anzahl der gefundenen Filmtitel: ${TREFFERANZAHL}" #------------------------------------------------------------------------------# echo "${AUSGABE}" | while read ZEILE do DATENSATZ="$(echo "${ZEILE}" | sed 's#"[ \n]*,[ \n]*"#"|"#g' | tr -s '[{|}]' '\n')" TREFFER="$(echo "${DATENSATZ}" | fgrep '"title"="' | fgrep -i "${FILMNAME}")" if [ -n "${TREFFER}" ] ; then echo "#-------------------------------------------------------#" IMDB_ID="$(echo "${DATENSATZ}" | fgrep '"id"' | awk -F'=' '{print $2}' | awk -F'"' '{print $2}')" #IMDB_URL="http://www.imdb.com/title/${IMDB_ID}/" IMDB_URL="<a href='http://www.imdb.com/title/${IMDB_ID}/'>IMDB-URL</a>" echo "IMDB-URL: ${IMDB_URL}" echo "${DATENSATZ}" fi done #------------------------------------------------------------------------------# rm -f ${TEMP} #------------------------------------------------------------------------------# </file> ===== FreeBSD - Paket ===== [[http://imdbpy.sourceforge.net/]] gibt leider immer nur den ersten Treffer aus, der muss nicht immer passen > pkg install www/py-imdbpy > /usr/local/bin/get_first_movie.py "matrix reloaded" Best match for "matrix reloaded" Movie ===== Title: Matrix Reloaded, The (2003) Genres: Action, Sci-Fi. Director: Andy Wachowski, Lana Wachowski. Writer: Andy Wachowski, Lana Wachowski, Andy Wachowski, Lana Wachowski. Cast: Ray Anthony (Power Station Guard), Christine Anu (Kali), Andy Arness (Police #2), Alima Ashton-Sheibu (Link's Niece), Helmut Bakaitis (The Architect). Runtime: 138. Country: USA, Australia. Language: English, French. Rating: 7.2 (401092 votes). Plot: Six months after the events depicted in The Matrix, Neo has proved to be a good omen for the free humans, as more and more humans are being freed from the matrix and brought to Zion, the one and only stronghold of the Resistance. Neo himself has discovered his superpowers including super speed, ability to see the codes of the things inside the matrix, and a certain degree of precognition. But a nasty piece of news hits the human resistance: 250,000 machine sentinels are digging to Zion and would reach them in 72 hours. As Zion prepares for the ultimate war, Neo, Morpheus and Trinity are advised by the Oracle to find the Keymaker who would help them reach the Source. Meanwhile Neo's recurrent dreams depicting Trinity's death have got him worried and as if it was not enough, Agent Smith has somehow escaped deletion, has become more powerful than before and has chosen Neo as his next target.

imdb-abfrage.txt · Zuletzt geändert: 2016/04/13 00:49 (Externe Bearbeitung)