Exception in thread Thread-1: Traceback (most recent call last): File "/home/mac126/.pyenv/versions/3.6.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/mac126/Desktop/11/day1/spider_commplete.py", line 131, in run save_url(html_content,url_str) File "/home/mac126/Desktop/11/day1/spider_commplete.py", line 41, in save_url with open(file_path,'wb') as f: FileNotFoundError: [Errno 2] No such file or directory: './download/js-tutorial.html'
這個錯誤很低級,不過還是寫出來,希望大家引以為戒,不要像我一樣粗心大意。
在項目目錄添加一個文件夾就好