Created
March 24, 2012 20:46
-
-
Save mehulved/2187621 to your computer and use it in GitHub Desktop.
Spell Checking with Google
This file contains hidden or 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
#!/usr/bin/env python | |
import requests | |
import sys | |
url = "https://www.google.com/tbproxy/spell?lang=en:" | |
word = sys.argv[1] | |
xml_struct = """ | |
<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"> | |
<text>%s</text> | |
</spellrequest>""" | |
r = requests.post(url, xml_struct % word) | |
print r.content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment