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.
This commit is contained in:
Azure
2019-06-30 12:15:22 -04:00
parent 350c41a86c
commit 83e072d6d5
4 changed files with 26 additions and 2 deletions

View File

@@ -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: