Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 1d392ad

Browse files
trying to intercept the no results response
1 parent bbe0c3d commit 1d392ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

specificScrapers/thotsbay.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package specificScrapers
22

33
import (
4+
"fmt"
45
"hatt/assets"
56
"hatt/helpers"
67
"hatt/login"
@@ -78,7 +79,6 @@ func (t T) Thotsbay() []variables.Item {
7879

7980
page := browser.MustPage(config.Search.Url)
8081
page.MustWaitLoad()
81-
8282
page.MustElement(".inputList li:nth-of-type(1) input").MustClick().MustInput(variables.CURRENT_INPUT)
8383

8484
page.MustElement(".formSubmitRow-controls button").MustClick()
@@ -88,7 +88,12 @@ func (t T) Thotsbay() []variables.Item {
8888
go page.EachEvent(func(e *proto.PageLoadEventFired) {
8989
// page loaded
9090
wg.Done()
91+
}, func(e *proto.NetworkResponseReceived) {
92+
if e.Response.URL == "https://thotsbay.ac/search/search" {
93+
fmt.Println(e.Response)
94+
}
9195
})()
96+
9297
wg.Wait()
9398

9499
c.OnHTML(".blockMessage--error.blockMessage--iconic", func(h *colly.HTMLElement) {

0 commit comments

Comments
 (0)