这两天在写东西的时候遇到了这个问题,主要是上传图片之后,无法在页面展示,原因就出在用join 拼接的路径中出现了"\"而造成的. >>> import os >>> m = os.path.join('路径','文件名.txt') >>> m '路径\\文件名.txt' >>> m.replace('\\','/') '路径/文件名.txt' >>> m = os.path.join('路径','
https://stackoverflow.com/questions/36019544/if-double-slash-is-used-2-times-in-xpath-what-does-it-mean Double slash // means any descendant node of the current node in the html tree which matches the locator. Single slash / means node which is a dir