pyspider
文章目录
pyspider 安装错误
在 Ubuntu16 中
错误一:
错误描述:
1 2raise ValueError("Invalid configuration:\n - " + "\n - ".join(errors)) ValueError: Invalid configuration:解决方法
- link:https://github.com/binux/pyspider/issues/831
You can change pyspider/webui/webdav.py line 203:
具体:
1 2 3 4 5 6#把 'domaincontroller': NeedAuthController(app), #修改为: 'http_authenticator':{ 'HTTPAuthenticator':NeedAuthController(app), },
错误二:
错误描述:
运行 pyspider all:
- 启动 pyspider 时 Could not create web server listening on port 25555 报错
解决方法:
- link: https://blog.csdn.net/FK103/article/details/79876011
杀进程:
1 2 3 4 5 6 7 8 9 10 11(py36) sawyer@Spider:~$ netstat -napl|grep 25555 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:25555 0.0.0.0:* LISTEN 14258/phantomjs (py36) sawyer@Spider:~$ pgrep phantomjs 14258 (py36) sawyer@Spider:~$ kill -9 14258 (py36) sawyer@Spider:~$ pyspider all # or use this command pkill -9 phantomjs
pyspider 运行文件目录
存放数据库
- directory = "$HOME/data/"
web interface 网页 iframe 太小
- https://github.com/binux/pyspider/issues/740
修改办法
- 找到/home/sawyer/anaconda3/envs/py36/lib/python3.6/site-packages/pyspider/webui/static/debug.min.js
- 文件 debug.min.js 或者 debug.js
找到代码位置
1doc.onreadystatechange()修改内容
1 2 3 4 5doc.onreadystatechange = () => { if (doc.readyState === 'complete') { $("#tab-web iframe").height(doc.body.scrollHeight + 60); } };- 把上述代码中的数字“60”修改成合适大小
文章作者
上次更新 2022-03-03 (5c64003)