Omegle for node
Quickstart
Take a look in the tests/
folder for more bulked out (and useful) examples.
Installion:
npm install omegle
Script:
Omegle = Omegle; var om = ; // This starts a new conversationomstart{ iferr console;}; // Omegle extends the standard EventEmitter class so just use the on function to subscribe to them// See below for full listom; // Show you are typing/not typing (optional callback function(err){} when request completes)om;om; // Disconnect from current chat (callback as above)om;
Events list
These events are emitted, some with arguments:
waiting
connected
gotMessage
strangerDisconnected
typing
stoppedTyping
recaptchaRequired
recaptchaRejected
count
spyMessage
spyTyping
spyStoppedTyping
spyDisconnected
question
suggestSpyee
error
Captcha
Sadly, omegle has captchas. The recaptchaRequired
event can be used to solve these by using a human (no, npm install human
does not work here) or possibly making many new connections until a captcha is not required. This library was never intended to be used for say spamming or making automated bots, but more so that humans can interface with omegle without being on the site. So the odd captcha should not be too much of a problem provided you present the catpcha to the user and get them to input the result.
Further Asides
You can change the user agent string and host to connect to by using the constructor or by accessing the object:
var om = 'user agent string' 'host'; omuserAgent = 'blah';omhost = 'foo.omegle.com';