Category Archives: Note To Self

NTS – Get wikipedia page content by API

At the url http://en.wikipedia.org/w/api.php?action=parse&page={page_name} you get the html content and some metadata of a Wikipedia page.
E.g. Richard D. James Album

With parameters prop=text&format=json&callback=mycallback you get only the html text with jsonp format.
E.g. Richard D. James Album

With parameter section=0 you get just the infobox and the abstract of the page.
E.g. Richard D. James Album

With parameter prop=text|images you get also the images names.
E.g. Richard D. James Album

To get the full path of the images follow these guidelines: http://commons.wikimedia.org/wiki/FAQ#What_are_the_strangely_named_components_in_file_paths.3F

NTS – Retrieve release cover art

To get the release cover images by musicbrainz release id, just point to http://coverartarchive.org/release/{mbid}.
For example go to http://coverartarchive.org/release/c63b0c2e-aa56-4808-bf4f-14c9f6a9982d to get a JSON doc with metadata like paths to images for Crystal Castles’ III release.
Or you could populate a src attribute of an img tag with:

Via MusicBrainz

NTS – Feed dei cinema per MyMovies

Il sito mymovies.it dà la possibilità di iscriversi al feed dei film attualmente in programmazione di un dato cinema.
Per ottenere l’indirizzo del feed bisogna andare sulla pagina del cinema (per esempio Cinema Tiziano), prendere l’id del cinema (in questo caso 5235) e andare all’indirizzo http://www.mymovies.it/cinema/xml/rss/cinema.asp?id={id} (in questo caso http://www.mymovies.it/cinema/xml/rss/cinema.asp?id=5235)