Moved ID-fetching code into its own function, and added a multiple-line parser
Line parser correctly removes empty elements and converts out of Unicode
Now runs fairly well, save a few problems. It always seems to fail on the page 'Letter of Inheritance', probably because it doesn't have an ID