diff --git a/imdb-scraper.go b/imdb-scraper.go index edb71b1..59542a5 100644 --- a/imdb-scraper.go +++ b/imdb-scraper.go @@ -8,6 +8,7 @@ import ( "strings" "unicode" + "git.0x0001f346.de/andreas/useragents" "git.0x0001f346.de/andreas/utils" "github.com/gocolly/colly" ) @@ -68,7 +69,7 @@ func Scrap(id string) (IMDbEntry, error) { c := colly.NewCollector( colly.MaxDepth(1), colly.AllowedDomains("www.imdb.com"), - colly.UserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"), + colly.UserAgent(useragents.GetRandomUserAgent()), ) c.OnRequest(func(r *colly.Request) {