Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created September 16, 2025 11:46
Show Gist options
  • Select an option

  • Save aspose-com-gists/9d7c6491e9611f8d42a3f7867eb6319d to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-gists/9d7c6491e9611f8d42a3f7867eb6319d to your computer and use it in GitHub Desktop.
Read HTML File in Python
import os
import aspose.html as html
from aspose.html import *
# Setup an output directory and load the License.
output_dir = "file.html"
License = html.License()
License.set_license("License.lic")
# Load the source HTML file.
document = HTMLDocument(output_dir)
# Write the document content to the output stream.
print(document.document_element.outer_html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment