diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-02-10 08:09:07 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-02-10 08:09:07 +0100 |
commit | 17080a02484a6ca020abe7a86819ab92ebfeaf0e (patch) | |
tree | 4a847e3386076c4ba4dfd32aa7fca69507537ac0 | |
parent | 03ecb026ff4d0e545cf21d463807b40265441bb3 (diff) |
Improved Polish gambling sites fetch script.improved/polish-gambling-fetch
* fails quite often in the CI, so ignore potential xmllint error
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rwxr-xr-x | utils/gambling_sites_download.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/gambling_sites_download.sh b/utils/gambling_sites_download.sh index d7600a76b..93eb81549 100755 --- a/utils/gambling_sites_download.sh +++ b/utils/gambling_sites_download.sh @@ -13,7 +13,8 @@ DOMAINS="$(curl -s 'https://www.gamingcommission.be/en/gaming-commission/illegal is_str_empty "${DOMAINS}" "Please check gambling sites URL and sed REGEX." printf '(2) %s\n' "Downloading Gambling Sites (Poland)" -DOMAINS_PL="$(curl -s https://hazard.mf.gov.pl/api/Register | xmllint --xpath "/*[local-name(.)='Rejestr']/*[local-name(.)='PozycjaRejestru']/*[local-name(.)='AdresDomeny']/text()" -)" +DOMAINS_PL="$(curl -s https://hazard.mf.gov.pl/api/Register)" +DOMAINS_PL="$(echo "${DOMAINS_PL}" | xmllint --xpath "/*[local-name(.)='Rejestr']/*[local-name(.)='PozycjaRejestru']/*[local-name(.)='AdresDomeny']/text()" - || true)" is_str_empty "${DOMAINS_PL}" "Please check gambling sites URL and XPath." echo "${DOMAINS}" "${DOMAINS_PL}" | sort | uniq >${LIST} |