Skip to content

Instantly share code, notes, and snippets.

@bibiboot
Created October 8, 2012 05:37
Show Gist options
  • Save bibiboot/3850879 to your computer and use it in GitHub Desktop.
Save bibiboot/3850879 to your computer and use it in GitHub Desktop.
Dump of wordnik
"""
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