Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16448

How to use Python to diff two HTML files?

$
0
0

I want use Python to diff two HTML files:

Example :

html_1 = """<p>i love it</p>"""html_2 = """ <h2>i love it </p>"""

the diff file will be like this :

diff_html = """<del><p>i love it</p></dev><ins><h2>i love it</h2></ins>"""

Is there a Python lib to help me do this?


Viewing all articles
Browse latest Browse all 16448


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>