Last active
December 29, 2015 01:59
-
-
Save IshamMohamed/7597734 to your computer and use it in GitHub Desktop.
This is a sample Python code impementation of Meanings API of Easy APIs Project (http://gcdc2013-easyapisproject.appspot.com/)
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 | |
#read response for word 'Excitement' | |
response = urllib2.urlopen('http://gcdc2013-easyapisproject.appspot.com/meanings?q=excitement') | |
html = response.read() | |
html = html[1:] #remove first { | |
html = html[:-1] #remove last } | |
html = html.split('}{') #split with '}{' | |
print html[0] #Print 1st result | |
print html[1] #Print 2ns result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment