LyricWiki:SOAP/Python
From LyricWiki
[edit]
Setup
- Using python 2.4 or better install ZSI. (download the tar.gz and run "python setup.py install")
- The above should have copied 2 files into your python24/scripts directory.
- Run the following command as indicated in the ZSI documentation
- python24/python python24/scripts/wsdl2py --complexType --url=http://lyricwiki.org/server.php?wsdl
- The above should have copied 2 more files into your python24/scripts directory. These files will need to be put someplace where python can see them. Either in the working directory or one the python.pth file points to.
[edit]
Script
- An example script to pull lyrics would look something like this:
import LyricWiki_services
soap = LyricWiki_services.LyricWikiBindingSOAP("http://lyricwiki.org/server.php")
song = LyricWiki_services.getSongRequest()
song.Artist = 'Iced Earth'
song.Song = 'Burning Times'
result = soap.getSong(song)
print result.Return.Lyrics
+ 

