Python - editing local HTML files - Should I edit all of the content as a one string or as an array line by line?
I suggest that instead of creating your own templating language (which is what this task amounts to), you use one of the many which already exist, and use that to perform the necessary operations. Try Jinja2, Django Templates, or Cheetah to see what you fancy. There are also many others.
Just to be clear this is not a scraping question.
I'm trying to automate some editing of similar HTML files. This involves removing content between tags.
When editing HTML files locally, is it easier to open() the file then dump the content line by line into a string so it's easier to apply a regular expression?
Thanks