Created
November 22, 2013 10:27
-
-
Save IshamMohamed/7597816 to your computer and use it in GitHub Desktop.
This is a Python implementation of Meanings API from Easy APIs Project (http://gcdc2013-easyapisproject.appspot.com/) to get input from user and give meanings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
print "Enter a word:", | |
q = raw_input() #get word from user | |
response = urllib2.urlopen('http://gcdc2013-easyapisproject.appspot.com/meanings?q='+q) | |
html = response.read() | |
html = html[1:] #remove first { | |
html = html[:-1] #remove last } | |
html = html.split('}{') #split and put each resutls to array | |
for meanings in html: | |
print meanings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment