鏡像下載、域名決議、時間同步請點擊 阿里云開源鏡像站
自從抖音出了網頁版
很多小伙伴,上班刷起來了
今天,寫一篇教大家如何使用linux刷抖音

抖音入駐PC端之后,其實就是一個終端的網站頁面
看看我們如何在Linux端,
完成搜索、截圖、訪問網頁等等功能
一、首先增加一下新yum
vim /etc/yum.repo.d/google-chrome111.repo
二、調整內容
[yum源名稱]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub

三、yum安裝goglechrome
#安裝
[root@harxxx ~]# yum -y install google-chrome-stable --nogpgcheck

四、我們來看看是啥版本
#查看-版本-資訊
[root@har ~]# google-chrome -version
Google Chrome 91.0.4472.106
[root@har ~]#
五、shell腳本玩轉瀏覽器
1、shell使用瀏覽器
直接輸入百度及搜索內容
截屏百度
[root@harbor tmp]# google-chrome --no-sandbox --headless --disable-gpu
--screenshot https://www.baidu.com/
[0615/170830.274431:WARNING:headless_browser_main_parts.cc(106)] Cannot create Pref Service with no user data dir.
[0615/170830.329462:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[0615/170831.542038:INFO:headless_shell.cc(648)] Written to file screenshot.png.
2、查詢搜索結果
截屏百度
[root@harbor tmp]# google-chrome --no-sandbox --headless --disable-gpu
--screenshot https://www.baidu.com/
[0615/170830.274431:WARNING:headless_browser_main_parts.cc(106)] Cannot create Pref Service with no user data dir.
[0615/170830.329462:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[0615/170831.542038:INFO:headless_shell.cc(648)] Written to file screenshot.png.
效果如下 ↓ ↓ ↓

4、命令列搜索歐洲杯足球寶貝
linux會在命令列搜索并保存 足球寶貝的搜索結果
#我們看看都搜到了什么
[root@harbor tmp]# google-chrome --no-sandbox --headless --disable-gpu
--screenshot https://www.baidu.com/s?wd=%E8%B6%B3%E7%90%83%E5%AE%9D%E8%B4%9D
[0615/170830.274431:WARNING:headless_browser_main_parts.cc(106)] Cannot create Pref Service with no user data dir.
[0615/170830.329462:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[0615/170831.542038:INFO:headless_shell.cc(648)] Written to file screenshot.png.
5、在命令列打開抖音直播頁面 是這樣的

六、linux上使用百度搜索
1、搜索命令
[root@localhost tmp]# google-chrome-stable --no-sandbox --headless --disable-gpu
--dump-dom https://www.baidu.com/
2、直接訪問,看結果

3、搜到效果如下
例如,使用瀏覽器 打開 抖音網址 結果如下:

本文轉自:https://blog.csdn.net/weixin_42350212/article/details/124368382
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/476373.html
標籤:其他
上一篇:如何為反向遞回減少函式創建型別?
下一篇:用戶管理
