Created
September 16, 2025 11:46
-
-
Save aspose-com-gists/9d7c6491e9611f8d42a3f7867eb6319d to your computer and use it in GitHub Desktop.
Read HTML File in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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