Charset detection heuristics added with chardet lib.

This commit is contained in:
Musab Gültekin
2019-07-03 18:08:28 +03:00
parent b355a566cf
commit 33238bc875
7 changed files with 90 additions and 35 deletions

View File

@ -53,10 +53,10 @@ func NewGeziyor(opt *Options) *Geziyor {
}
if opt.UserAgent == "" {
geziyor.Opt.UserAgent = "Geziyor 1.0"
geziyor.Opt.UserAgent = client.DefaultUserAgent
}
if opt.MaxBodySize == 0 {
geziyor.Opt.MaxBodySize = 1024 * 1024 * 1024 // 1GB
geziyor.Opt.MaxBodySize = client.DefaultMaxBody
}
if opt.Cache != nil {
geziyor.Client.Transport = &httpcache.Transport{