mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
fw-addr-lists: use prepared user-agent string with fetch
This commit is contained in:
parent
a2749b2760
commit
4b8854946d
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
|
:global FetchUserAgent;
|
||||||
:global FwAddrLists;
|
:global FwAddrLists;
|
||||||
:global FwAddrListTimeOut;
|
:global FwAddrListTimeOut;
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ $WaitFullyConnected;
|
||||||
:if ($Data = false) do={
|
:if ($Data = false) do={
|
||||||
:do {
|
:do {
|
||||||
:set Data ([ /tool/fetch check-certificate=$CheckCertificate output=user \
|
:set Data ([ /tool/fetch check-certificate=$CheckCertificate output=user \
|
||||||
($List->"url") as-value ]->"data");
|
http-header-field=({ $FetchUserAgent }) ($List->"url") as-value ]->"data");
|
||||||
} on-error={
|
} on-error={
|
||||||
:if ($I < 4) do={
|
:if ($I < 4) do={
|
||||||
$LogPrintExit2 debug $0 ("Failed downloading, " . $I . ". try: " . $List->"url") false;
|
$LogPrintExit2 debug $0 ("Failed downloading, " . $I . ". try: " . $List->"url") false;
|
||||||
|
|
Loading…
Reference in a new issue