Skip to content

Commit

Permalink
add user-agent to fix EOF error
Browse files Browse the repository at this point in the history
  • Loading branch information
mburakerman committed Jun 20, 2024
1 parent 268a886 commit 544f49b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ func main() {
colly.AllowedDomains("dictionary.cambridge.org"),
)

c.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"

var wordLevel string
var meanings []string
var exampleSentence string
Expand Down

0 comments on commit 544f49b

Please sign in to comment.