2
我正在使用python脚本来接收包含一堆网站网址的文件,并在新标签中打开所有文件。但是,我越来越开放的第一个网站时的错误信息:这是我得到:使用脚本开启网站
0:41: execution error: " https://www.pandora.com/ " doesn’t understand the “open location” message. (-1708)
我的脚本到目前为止是这样的:
import os
import webbrowser
websites = []
with open("websites.txt", "r+") as my_file:
websites.append(my_file.readline())
for x in websites:
try:
webbrowser.open(x)
except:
print (x + " does not work.")
我的文件包含了一堆的自己的网址。