2022-03-16 11:06:52 +07:00
|
|
|
import os
|
|
|
|
|
|
|
|
class main:
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def get_html(location):
|
|
|
|
html_dict = {}
|
2025-03-03 13:10:10 +07:00
|
|
|
html_page_list = os.listdir(location)
|
2022-03-16 11:06:52 +07:00
|
|
|
for html_page in html_page_list:
|
2025-03-03 13:10:10 +07:00
|
|
|
full_path = os.path.join(location, html_page)
|
|
|
|
if os.path.isfile(full_path): # Ensure it's a file, not a directory
|
|
|
|
with open(full_path, 'r') as html_handle:
|
|
|
|
html_dict[html_page] = html_handle.read()
|
2022-03-16 11:06:52 +07:00
|
|
|
return html_dict
|