|
发表于 2018-8-25 13:06:11
|
显示全部楼层
评论区放不了图片这段代码为什么运行的时候有错误啊是我少装了什么吗
url_list = [item.replace("\", '') for item in url_list]
if not os.path.exists(doc_id):
os.mkdir(doc_id)
for index, url in enumerate(url_list):
content = session.get(url).content
path = os.path.join(doc_id, str(index) + '.jpg')
with open(path, 'wb') as f:
f.write(content)
错误信息是E:\python_pycharm\venv\Scripts\python.exe E:/python_pycharm/xzq.py
File "E:/python_pycharm/xzq.py", line 63
url_list = [item.replace("\", '') for item in url_list]
^
SyntaxError: EOL while scanning string literal
Process finished with exit code 1
|
|