dancrew32 / ask

The PhantomJS Omegle question-asker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ask

Ask a question to two strangers on Omegle and receive an array of responses in stdout.

Example

Input

phantomjs ask.js "What is your favorite color?"

or make a bash alias for it:

alias ask='phantomjs /path/to/ask.js'

then just

ask "What is your favorite color?"

Output

If no one responds to your question, the script dies with an empty array [].

If they do respond, it looks something like:

$ ask "What's your favorite brand of sneakers?"
["Stranger 1: wat are sneakers","Stranger 2: vans","Stranger 2: converse"]

Install

sudo npm install -g phantomjs
git@github.com:dancrew32/ask.git
cd ask && phantomjs ask.js "What is the meaning of life?"

Handling STDOUT

Just pipe this output into another script, parse as JSON, iterate and split with something like:

/(?P<name>Stranger.+?):(?P<response>.*)/

About

The PhantomJS Omegle question-asker


Languages

Language:JavaScript 100.0%