Created
October 8, 2012 05:37
-
-
Save danish-rehman/3850879 to your computer and use it in GitHub Desktop.
Dump of wordnik
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
""" | |
Dumps html from http://www.wordnik.com/ for the words mentioned in the | |
file 'only_words'. An appendix html is also created named as 'words.html', | |
which contains the link to the dumped htmls of corresponding words. | |
""" | |
import os | |
for line in [ line.rstrip('\n') for line in open('only_words') ]: | |
fw = open('words.html', 'a') | |
os.system('wget -E -H -k -K -p http://www.wordnik.com/words/%s'% line) | |
fw.write("<a href='www.wordnik.com/words/%s.html' target='_blank'>%s</a><br>"%(line, line)) | |
fw.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment