undetected-chromedriver、opencv-python已经安装成功。
运行示例代码
https://git.imooc.com/coding-92/coding-92/src/master/zhihu_loger.py
提示错误。错误详情如下:
Traceback (most recent call last):
File "/Users/jiahaoran/ArticleSpider/ArticleSpider/utils/zhihu_login.py", line 10, in <module>
import cv2
File "/opt/homebrew/lib/python3.9/site-packages/cv2/__init__.py", line 5, in <module>
from .cv2 import *
ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/cv2/cv2.cpython-39-darwin.so, 2): Library not loaded: /opt/homebrew/opt/ffmpeg/lib/libavcodec.58.dylib
Referenced from: /opt/homebrew/lib/python3.9/site-packages/cv2/cv2.cpython-39-darwin.so
Reason: image not found

带你彻底掌握Scrapy,用Django+Elasticsearch搭建搜索引擎
了解课程