Skip to content

Commit

Permalink
Improved Polish gambling sites fetch script. (#2315)
Browse files Browse the repository at this point in the history
* fails quite often in the CI, so ignore potential xmllint error

Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni authored Feb 10, 2024
1 parent ad25aff commit f4d7aa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/gambling_sites_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit f4d7aa4

Please sign in to comment.