scantrad userAgent3 (#5577)
* scantrad userAgent3 look like the random int only called once and being used again causing repeated number * min 2/3 digit * referer
This commit is contained in:
parent
c362834c84
commit
9dc679a036
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Scantrad'
|
||||
pkgNameSuffix = 'fr.scantrad'
|
||||
extClass = '.Scantrad'
|
||||
extVersionCode = 11
|
||||
extVersionCode = 12
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
@ -42,11 +42,17 @@ class Scantrad : ParsedHttpSource() {
|
||||
.addNetworkInterceptor(rateLimitInterceptor)
|
||||
.build()
|
||||
|
||||
protected open val userAgentRandomizer = "${Random.nextInt(9).absoluteValue}"
|
||||
protected open val uAR = userAgentRandomizer
|
||||
protected open val userAgentRandomizer1 = "${Random.nextInt(9).absoluteValue}"
|
||||
protected open val userAgentRandomizer2 = "${Random.nextInt(10,99).absoluteValue}"
|
||||
protected open val userAgentRandomizer3 = "${Random.nextInt(100,999).absoluteValue}"
|
||||
|
||||
override fun headersBuilder() = Headers.Builder().apply {
|
||||
add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/8$uAR.0.4$uAR$uAR$uAR.1$uAR$uAR Safari/537.36")
|
||||
add("Referer", baseUrl)
|
||||
add(
|
||||
"User-Agent",
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " +
|
||||
"Chrome/8$userAgentRandomizer1.0.4$userAgentRandomizer3.1$userAgentRandomizer2 Safari/537.36"
|
||||
)
|
||||
}
|
||||
|
||||
// Popular
|
||||
|
Loading…
x
Reference in New Issue
Block a user