manipulating javascript code with BeautifulSoup
Beautiful Soup is a Python library for pulling data out of HTML and XML files.  You can't directly use it for angular js code.
I have html code embeded with java script code related to angular js. Later I realized that rows and columns of html code need to be inter cahnged. As I have bunch of html files so decided to use Python script. Have tried using BeautifulSoup 4.x. I could able to do interchange of rows and columns but while writing back to disk, it is noticed that few java script tags are missing. 
My question is can I use beautiful soup for angular js code? if yes, code snippet would be extremely helpful.
Thanks