global-functions: generate user agent string in function...

... and add the caller and my shortened url.
This commit is contained in:
Christian Hesse 2024-03-16 23:10:47 +01:00
parent 576a2c97cf
commit eb7919c1d8
3 changed files with 19 additions and 14 deletions

View file

@ -14,12 +14,12 @@
:do {
:local ScriptName [ :jobname ];
:global FetchUserAgent;
:global FwAddrLists;
:global FwAddrListTimeOut;
:global CertificateAvailable;
:global EitherOr;
:global FetchUserAgent;
:global LogPrint;
:global LogPrintOnce;
:global ScriptLock;
@ -65,7 +65,7 @@
:if ($Data = false) do={
:do {
:set Data ([ /tool/fetch check-certificate=$CheckCertificate output=user \
http-header-field=({ $FetchUserAgent }) ($List->"url") as-value ]->"data");
http-header-field=({ [ $FetchUserAgent $ScriptName ] }) ($List->"url") as-value ]->"data");
} on-error={
:if ($I < 4) do={
$LogPrint debug $ScriptName ("Failed downloading, " . $I . ". try: " . $List->"url");