From 83e072d6d5b248c416f89cb144e677b2a3bdaba9 Mon Sep 17 00:00:00 2001 From: Azure Date: Sun, 30 Jun 2019 12:15:22 -0400 Subject: 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. --- doc/README.siteconf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') 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 "" url_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: -- cgit v1.2.3