File size: 611 Bytes
f1554a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from SEM.run_single_sem import run_single_pp
from bs4 import BeautifulSoup
import shutil

# file = open('examples/6.html', encoding='utf-8')

# file_content = file.read().decode('utf-8')
# file_content = file

# file_content = 'examples/6.html'
# pp_root = 'demo_pp.html'
# with open(pp_root, 'wb') as file:
#     with open(file_content, 'rb') as html:
#         shutil.copyfileobj(html, file)

with open("examples/6.html", "r") as file:
    example_file_content = file.read()

run_single_pp(example_file_content)

# soup = BeautifulSoup(file, features="html.parser")
# print("soup.contents: ", soup.contents)