Closed jrdp18 closed 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.
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>
Can you try typing chcp 65001
into cmd and running the script again?
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>
You're not using up-to-date version. Please pull the repository again.
Works now, thank you very much!
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!