Can't store downloaded files in their concerning folders

前端 未结 3 1006
再見小時候
再見小時候 2021-01-12 08:02

I\'ve written a script in python in combination with selenium to download few document files (ending with .doc) from a webpage. The reason I do not wish to use request

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-12 08:28

    Use pathlib library in Python 3 or the pathlib2 library for Python 2 to handle paths. It gives you an object-oriented way to work with files and directories. Also it has PurePath object, which can work with paths without even touching the filesystem.

提交回复
热议问题