Added a try and except for saving the page, I had been receiving an AttributeError when attempting to save the page source.