w3m その8 (737レス)
1-

631: 2019/09/05(木)01:16 AAS
# 飛ぶURLを作る。
URL="外部リンク:www.google.co.jp\
q=$(w3go $(nkf --url-input <<<$QUERY_STRING))&hl=ja&biw=&bih=&gbv=1&num=100"

# googleのhtmlをfilteringして表示する。
# ここら辺は癖なのか仕様なのかがあってcopyして実行しても
# 動かないだろうからこういう書き方をしている。
# またここは丁寧にやれはやるほど遅くなる。
# 最後のsを,で仕切っているのは$QUERY_STRINGの中に%が含まれる為。
<<EOF
Content-Type: text/plain
w3m-control: GOTO $URL$NEXT
w3m-control: VIEW
w3m-control: PIPE_BUF sed 's%<form.*/form>'\
'%<form action="file:///cgi-bin/google.zsh">'\
'<input name=submit type=hidden value=1>'\
'<input type=text value="$(nkf --url-input <<<$QUERY_STRING)"></form>%;'\
's%\(<a [^>]*>\)<[^>]*>\([^<]*\)</[^>]*>%\1\2%g;'\
's%\(<a [^>]*href="\)/%\1外部リンク:www.google.co.jp\
's,<a [^>]*;\(start=[0-9]*\)[^<]*\(&.t;</a>\)'\
',<a href="file:///cgi-bin/google.zsh?\1;$QUERY_STRING">移動 \2,g'
w3m-control: VIEW

EOF
1-
あと 106 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.006s