wrote python script to decode html entities in scraped text

bradl/monsters-adult-gold-dragon
James Miller 2020-02-17 21:45:02 -06:00
parent 07caa27fce
commit 70f0b7cb3b
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import html
def main():
# read in the file
with open("../data/yaml/monsters.yaml", 'r') as content_file:
content = content_file.read()
# print(html.unescape(content))
with open("../data/yaml/monsters-fixed.yaml", 'w') as outfile:
outfile.write(html.unescape(content))
if __name__ == "__main__":
main()