Skip to content

Commit

Permalink
Fix: Browser blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard127 committed Jul 21, 2023
1 parent e089650 commit 7647ef8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ func main() {

for {
page := browser.MustPage("https://old.reddit.com/login")

page.MustWaitStable()
fmt.Println("Page opened")

user := NewRandomUser()

page.MustElement("#user_reg").MustInput(user.Username)
Expand Down Expand Up @@ -92,6 +93,8 @@ func main() {
}
fmt.Println("Email verified")

browser.SetCookies(nil)
page.MustClose()
fmt.Println("Waiting 10 minutes...")
time.Sleep(time.Minute * 10)
}
Expand Down

0 comments on commit 7647ef8

Please sign in to comment.