Hi, I’m Lex the Lex who likes to bully Superman

Areas of expertise: Python development, network security penetration, Windows Domain control Exchange architecture

Today’s highlights:

1, Linux SAO operation: pure command line play GoogleChrome browser;

2. Open the soccerbaby search screenshot on the Linux command line

Chrome for Linux

Windows chrome browser, we must be playing 666 bar.

Today, a curious article

To tell you how to use Linux pure command line

Play Google Chrome, while watching the European Cup, while watching soccer baby

Complete search, screenshots, web access and other functions

Create a yum source

[root@harbor ~]# vim /etc/yum.repo.d/google-chrome.repo   
Copy the code

Ii. Modify it to the following content

[google-chrome]
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
Copy the code

Install Google Chrome with yum

[root@harbor ~]# yum -y install google-chrome-stable --nogpgcheck
Copy the code

4. Check the Chrome version

[root@harbor ~]# Google Chrome -version Google Chrome 91.0.4472.106 [root@harbor ~]#Copy the code

Five, command line play Google browser

1. Use Baidu to search for commands

[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)] always create a 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 the file screenshot. The PNG.Copy the code

2, view search results screenshot

[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)] always create a 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 the file screenshot. The PNG.Copy the code

The effect is as follows ↓ ↓ ↓

4, command line search Euro Soccer baby

Linux searches and saves soccerbaby’s search results on the command line

[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)] always create a 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 the file screenshot. The PNG.Copy the code

5, the command line opens the European Cup picture as follows:

Six, Baidu search content viewing

1. Search commands

[root@localhost tmp]# google-chrome-stable --no-sandbox --headless --disable-gpu 
--dump-dom https://www.baidu.com/
Copy the code

2. Open Baidu and print the search results

The content that we’re searching for will be printed as HTML content.

3. The effect is as follows

For example, using Baidu to search for Juejin results in the following: