if __name__ == '__main__':
    htmlData = (
        """<html> <head> <script type="text/javascript"> console.log("< < not able to write these & also these >> "); </script> </head> <body> <div> start of div </div> </body> </html>"""
        )
doc = LH.fromstring(htmlData)
how to make beautifulsoup encode and decode the contents of a script tag