aboutsummaryrefslogtreecommitdiffstats
path: root/doc/README.siteconf
diff options
context:
space:
mode:
authorAzure <azure@fox.blue>2019-06-30 16:15:22 +0000
committerAzure <azure@fox.blue>2019-06-30 16:15:22 +0000
commit83e072d6d5b248c416f89cb144e677b2a3bdaba9 (patch)
treece5478bd6a172d5e32cc3a68e2e5a748407ff05a /doc/README.siteconf
parentUpdate ChangeLog (diff)
downloadw3m-83e072d6d5b248c416f89cb144e677b2a3bdaba9.tar.gz
w3m-83e072d6d5b248c416f89cb144e677b2a3bdaba9.zip
Allow setting User Agent in Siteconf
Since Google gives usable search results to Lynx but not to w3m, and many other sites block Lynx but /not/ w3m, we want to be able to set the User Agent string on a per-site basis.
Diffstat (limited to '')
-rw-r--r--doc/README.siteconf7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/README.siteconf b/doc/README.siteconf
index 39b1028..5eb2554 100644
--- a/doc/README.siteconf
+++ b/doc/README.siteconf
@@ -13,6 +13,7 @@ substitute_url "<destination-url>"
url_charset <charset>
no_referer_from on|off
no_referer_to on|off
+user_agent "string"
The last match wins.
@@ -40,6 +41,12 @@ url_charset utf-8
When combinated with "decode_url" option turned on, links to
Wikipedia will be human-readable.
+url m@^https?://(.*\.)google\.com/@
+user_agent "Lynx/2.8.8dev.3 libwww-FM/2.14 SSL-MM/1.4.1"
+
+Tell Google we're actually Lynx. (So they send us a text-browser friendly
+results page.)
+
===== Regular expressions notes =====
Following expressions are all equivalent: