Skip to content

Commit 232423c

Browse files
Update endpoint
1 parent 69c4909 commit 232423c

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/scraper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
# uses: actions/checkout@v3
1414

1515
# - name: setup go
16-
# uses: actions/setup-go@v3
16+
# uses: actions/setup-go@v4
1717
# with:
18-
# go-version: '^1.18.1' # install the go version needed
18+
# go-version: '^1.20.3' # install the go version needed
1919
# check-latest: true
2020

2121
# - name: execute go script # run scraper.go to get the latest data

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Generate a machine-readable `.txt` blocklist of websites affiliated with [unregu
1212

1313
## Requirements
1414

15-
- Go >= 1.18
15+
- Go >= 1.20
1616

1717
## Setup instructions
1818

@@ -30,9 +30,9 @@ go run scraper.go
3030

3131
## Libraries/Frameworks used
3232

33-
- [fasttld](https://github.com/elliotwutingfeng/go-fasttld)
34-
- [xurls](https://github.com/mvdan/xurls)
33+
- [fasttld](https://github.com/elliotwutingfeng/go-fasttld)
34+
- [xurls](https://github.com/mvdan/xurls)
3535

3636
## Monetary Authority of Singapore Terms of Use
3737

38-
https://www.mas.gov.sg/terms-of-use
38+
<https://www.mas.gov.sg/terms-of-use>

scraper.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ func main() {
3131
zerowidthRegex := regexp.MustCompile("^[\u200B-\u200D\uFEFF]")
3232
whitespaceRegex := regexp.MustCompile("\\s+")
3333

34-
resp, err := http.Get("https://www.mas.gov.sg/api/v1/ialsearch?json.nl=map&wt=json&rows=10000&q=*:*&sort=date_dt+desc&start=0")
34+
resp, err := http.Get(
35+
"https://eservices.mas.gov.sg/statistics/api/v1/ialsearch?" +
36+
"json.nl=map&wt=json&sort=date_dt%20desc,approveddate_dt%20desc&q=*:*&rows=10000&start=0",
37+
)
3538
if err != nil {
3639
log.Fatal(err)
3740
os.Exit(1)

0 commit comments

Comments
 (0)