1
I need to line up a html code, in some parts it comes totally "messy", example:
<li><a href="dsadas">dsadaads</a></li><li><a href="dsadas">dsadaads</a></li><li><a href="dsadas">dsadaads</a></li>
HTML comes in one line, and I want it to be organized like this:
<li><a href="dsadas">dsadaads</a></li>
<li><a href="dsadas">dsadaads</a></li>
<li><a href="dsadas">dsadaads</a></li>
An example would be this website, he organizes everything. Now the question is: How can I align the entire site using the PYTHON 2.7. I noticed that there is a library of the site jsbeautifier.
I downloaded it and tried to use, but I did not understand very well the functioning.
My code downloads the HTML from my site, in which there is a long list. Then the file comes as . HTML
JSBEAUTIFER
datafile = file('meusitehtml.html')
import jsbeautifier
res = jsbeautifier.beautify(datafile)
res = jsbeautifier.beautify_file('some_file.js')
I don’t quite understand how I can use jsbeautifier.
-> I need an example of how I can use jsbeautifier?
In VS Code you should try to make it tranquil with the Beautify https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify#Overview
– hugocsl
With Google Developer Tool you can do this right in Chrome, if you want me to put the answer with some images teaching.
– hugocsl