-
-
Save Maycoooonm/5c166334f2d5203b91cf0813af4922f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const transform = require('ee-xml-to-json'); | |
var unirest = require('unirest'); | |
var XML = require('xml-simple'); | |
var sessionId = "" | |
var conversations = ["", "", "", "", "", "", ""]; | |
var lineRef = ""; | |
var prevref = "" | |
var stimulus = "oi" | |
var icognoCheck = "6fa999ff37ebaec6a5adddc5ecf96fb5" | |
unirest.post('http://app.cleverbot.com/webservicexml_ais_AYA') | |
.headers({ | |
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.0.0; MotoG3-TE Build/NJH47F)' | |
}) | |
.send(`stimulus=${stimulus}`) | |
.end(function (response) { | |
transform(response.raw_body).then((data) => { | |
console.log(data.webservicexml.session[0]['response'][0]); | |
}) | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment