安卓使用termux进行chromedriver调试
Termux
为Ubuntu in termux添加debian源
1
vim /etc/apt/sources.list.d/debian-stable.list
1
2
3
4
5
6deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable main
deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian-security/ stable-security main
deb [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main
deb-src [signed-by=/usr/share/keyrings/debian-archive-keyring.gpg] http://deb.debian.org/debian stable-updates main1
2apt update #不要upgrade
apt install -y debian-archive-keyring安装chromium
1
apt install -y chromium chromium-driver
安装python和selenium
1
2
3
4apt install -y python3 python3-pip
pip3 install selenium #如果pip频繁报错,请apt remove python-pip再手动安装
#echo "$(curl https://bootstrap.pypa.io/pip/get-pip.py)" >./get-pip.py
#python3 ./get-pip.py #安装pip进行调试
chromedriver文件路径在/usr/bin/chromedriver1
2vncserver :1
chromium --no-sandbox #在VNC桌面的终端内输入
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 不知名小驿站!