zoukankan      html  css  js  c++  java
  • 在linux中使用终端浏览器w3m

    w3m是一个基于文本的网页浏览器,支持多种操作系统,在命令行终端可以很好的支持中文。即使在没有鼠标支持的情况下也可以检查网页的输出。

    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

     可以通过滚动鼠标按箭头键移动光标点击所需的位置将光标移动到那里。

    2.3 输入文本框

    使用将光标移动到文本框位置,然后按 Enter键,就可以输入文本。

    2.4 网页跳转

    • 使用将光标移动到超链接位置,然后按 Enter键。
    • Tab键可将光标移动到页面上的下一个超链接位置。

    2.5 返回上一页

     Shift + B

    2.6 选项卡操作

    # 按 Shift + T打开一个新的选项卡。
    # 通过点击它们在标签之间进行切换,也使用 Shift+[ 和 Shift+] 快捷键在选项卡之间切换。

    更多参考:

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

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

    https://www.cnblogs.com/yinghao1991/p/6533206.html

  • 相关阅读:
    汉语-谚语:条条大路通罗马
    汉语-词语:缱绻
    几何-对称图形:中心对称图形
    java解析获取Excel中的数据--同时兼容2003及2007
    如何使gcc输出搜索到的头文件路径?
    如何使tmux可以像vi一样操作(如快速跳转到某一行)?
    如何使tmux能够使用鼠标上下滚动?
    ID3v2: 为aac格式的音频文件添加ID3v2 Header
    FFmpeg: 利用FFmpeg提取音频文件中的metadata
    C语言:变长结构体
  • 原文地址:https://www.cnblogs.com/bymo/p/9699353.html
Copyright © 2011-2022 走看看