mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-03 09:44:33 +02:00
global-functions: generate user agent string in function...
... and add the caller and my shortened url.
This commit is contained in:
parent
576a2c97cf
commit
eb7919c1d8
3 changed files with 19 additions and 14 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue