在网页文件中有如图的目录
这样形式的文件应该如何读取呀
def get_list_scene(file_path):
file_path = r'%s\Merchant of Venice_ List of Scenes.html' % a
file = open(file_path, 'r')
general_content = file.read()
scene = re.findall(r"" , general_content, re.MULTILINE)
scene_list = list(scene)
file.close()
print(scene_list)
file = open(scene_list[1], 'r')
print(file.read())
我的代码长这样
Traceback (most recent call last):
File "D:\1\文档\python\pythonProject1\大作业.py", line 26, in <module>
file = open('Belmont. A room in PORTIA\'S house.</a>', 'r')
OSError: [Errno 22] Invalid argument: '<a href="./merchant/merchant.1.2.html">Belmont. A room in PORTIA\'S house.'
进程已结束,退出代码1
咋个写啊 这玩意直接卡在第一步了TAT