bebound / pixivd

Pixiv Downloader - Batch download pictures from Pixiv
MIT License
138 stars 18 forks source link

无法自行创建 illustrations 文件夹 #2

Closed sanddudu closed 8 years ago

sanddudu commented 8 years ago
Traceback (most recent call last):
  File "pixiv.py", line 163, in <module>
    sys.exit(main())
  File "pixiv.py", line 157, in main
    options[choose](user)
  File "pixiv.py", line 127, in download_by_user_id
    download_illusts(data_list, save_path, add_user_folder=True)
  File "pixiv.py", line 107, in download_illusts
    save_path = get_file_path(illusts[0], save_path)
  File "pixiv.py", line 36, in get_file_path
    cur_dirs = list(filter(os.path.isfile, os.listdir(save_path)))
FileNotFoundError: [Errno 2] No such file or directory: '/home/***/Pixiv/illustrations'

看了下好像没有创建文件夹的代码,没写过 python 所以不多下判断

def get_default_save_path():
    current_path = os.path.dirname(os.path.abspath(sys.argv[0]))
    return os.path.join(current_path, 'illustrations')

Python 3.5.1

bebound commented 8 years ago

感谢提醒 马上修复