https-tls

Setup HTTPS details related to TLS according to the User Agent provided. Source code from got-scraping.
Install
$ npm install https-tls --save
Usage
'use strict'
const uniqueRandomArray = require('unique-random-array')
const userAgents = require('top-user-agents')
const tls = require('https-tls')
const randomUserAgent = uniqueRandomArray(userAgents)
const userAgent = randomUserAgent()
const https = tls(userAgent)
console.log(https)
You can also setup it as got hook:
'use strict'
const got = require('got')
const tlsHook = require('https-tls/hook')
const instance = got.extend({
hooks: {
beforeRequest: [
tlsHook
]
}
})
License
https-tls © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats