make use of git.0x0001f346.de/andreas/useragents
This commit is contained in:
parent
74f7deb672
commit
9fd87c0d22
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user