在linux中使用終端瀏覽器w3m

 

w3m是一個基於文本的網頁瀏覽器,支持多種操做系統,在命令行終端能夠很好的支持中文。即便在沒有鼠標支持的狀況下也能夠檢查網頁的輸出。html

 

1. 安裝w3m

$ sudo apt install w3m

 

2. w3m的經常使用使用操做

2.1 查看幫助信息

$ w3m -h
w3m version w3m/0.5.3+git20151119, options lang=en,m17n,image,color,ansi-color,mouse,gpm,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark,migemo
usage: w3m [options] [URL or filename]
options:
-t tab set tab width
-r ignore backspace effect
-l line # of preserved line (default 10000)
-I charset document charset
-O charset display/output charset
-B load bookmark
-bookmark file specify bookmark file
-T type specify content-type
-m internet message mode
-v visual startup mode
-M monochrome display
-N open URL of command line on each new tab
-F automatically render frame
-cols width specify column width (used with -dump)
-ppc count specify the number of pixels per character (4.0...32.0)
-ppl count specify the number of pixels per line (4.0...64.0)
-dump dump formatted page into stdout
-dump_head dump response of HEAD request into stdout
-dump_source dump page source into stdout
-dump_both dump HEAD and source into stdout
-dump_extra dump HEAD, source, and extra information into stdout
-post file use POST method with file content
-header string insert string as a header
+<num> goto <num> line
-num show line number
-no-proxy don't use proxy
-4 IPv4 only (-o dns_order=4)
-6 IPv6 only (-o dns_order=6)
-no-mouse don't use mouse
-cookie use cookie (-no-cookie: don't use cookie)
-graph use DEC special graphics for border of table and menu
-no-graph use ACII character for border of table and menu
-s squeeze multiple blank lines
-W toggle wrap search mode
-X don't use termcap init/deinit
-title[=TERM] set buffer name to terminal title string
-o opt=value assign value to config option
-show-option print all config options
-config file specify config file
-help print this usage message
-version print w3m version
-reqlog write request logfile
-debug DO NOT USE

 

2.2 打開指定網頁地址

$ w3m www.baidu.com

 能夠經過滾動鼠標按箭頭鍵移動光標點擊所需的位置將光標移動到那裏。git

 

2.3 輸入文本框

使用將光標移動到文本框位置,而後按 Enter鍵,就能夠輸入文本。chrome

 

2.4 網頁跳轉

  • 使用將光標移動到超連接位置,而後按 Enter鍵。
  • Tab鍵可將光標移動到頁面上的下一個超連接位置。

 

2.5 返回上一頁

 Shift + B瀏覽器

 

2.6 選項卡操做

# 按 Shift + T打開一個新的選項卡。
# 經過點擊它們在標籤之間進行切換,也使用 Shift+[ 和 Shift+] 快捷鍵在選項卡之間切換。cookie

 

更多參考:app

https://jingyan.baidu.com/article/4b52d702b5bd90fc5c774ba7.htmlpost

http://blog.51cto.com/balich/2063686?utm_source=oschina-appthis

http://www.javashuo.com/article/p-mlbjqbki-dy.htmlspa

相關文章
相關標籤/搜索