puilp0502 / webtoon-dl

Naver Comic Downloader
BSD 2-Clause "Simplified" License
5 stars 1 forks source link

How to use this? #4

Closed jrdp18 closed 7 years ago

jrdp18 commented 7 years ago

Hi!

I'm a Python layman. I've got Python 3 installed and tried running it thru Windows cmd. I get ImportError: No module named 'requests'. What should I do next?

Thanks!

puilp0502 commented 7 years ago

It's an external module. You have to install it with pip. In command prompt enter:

pip install requests

And you should be good to go.

jrdp18 commented 7 years ago

I got unicode error after this

C:\Users\xxxx\Downloads>naver.py
Input url:http://comic.naver.com/webtoon/detail.nhn?titleId=58526
Start[1]:1
End[unlimited]:2
Title Id: 58526
Base URL: http://comic.naver.com/webtoon/detail.nhn?titleId=58526&no=
Episode 1
Traceback (most recent call last):
  File "C:\Users\xxxx\Downloads\naver.py", line 61, in <module>
    print("Downloading "+author_id + "'s " + comic_name)
UnicodeEncodeError: 'cp932' codec can't encode character '\uc7ac' in position 31: illegal multibyte sequence

C:\Users\xxxx\Downloads>
puilp0502 commented 7 years ago

Can you try typing chcp 65001 into cmd and running the script again?

jrdp18 commented 7 years ago
Active code page: 65001

C:\Users\xxxx\Downloads>naver.py
Input url:http://comic.naver.com/webtoon/detail.nhn?titleId=58526
Start[1]:1
End[unlimited]:2
Title Id: 58526
Base URL: http://comic.naver.com/webtoon/detail.nhn?titleId=58526&no=
Episode 1
                         재활용's 연민의 굴레
     1
Traceback (most recent call last):
  File "C:\Users\xxxx\Downloads\naver.py", line 67, in <module>
    download_file(image_url, author_id+"/"+comic_name+"/"+str(episode),detail_url)
  File "C:\Users\xxxx\Downloads\naver.py", line 9, in download_file
    os.makedirs(foldername)
  File "C:\Python34\lib\os.py", line 227, in makedirs
    makedirs(head, mode, exist_ok)
  File "C:\Python34\lib\os.py", line 227, in makedirs
    makedirs(head, mode, exist_ok)
  File "C:\Python34\lib\os.py", line 237, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\r                \t 재활용'

C:\Users\xxxx\Downloads>
puilp0502 commented 7 years ago

You're not using up-to-date version. Please pull the repository again.

jrdp18 commented 7 years ago

Works now, thank you very much!