Created
February 21, 2018 07:22
-
-
Save kyujin-cho/6755c5cd120d191abc66ee9393e40136 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
require("babel-register") | |
const io = require('socket.io-client') | |
const axios = require('axios') | |
const cheerio = require('cheerio') | |
let sessions = [] | |
const streamer_name = 'funzinnu' | |
const makeSocket = async (i) => { | |
const socket = io('https://mrdestructoid.tgd.kr?q=' + streamer_name) | |
socket.on('viewers', function(r) { | |
console.log(`${i} : ${r} viewers`) | |
}) | |
socket.on('new', function(r) { | |
console.log(`log-${i} : ${r.text}`) | |
}) | |
socket.on('connect', () => { | |
console.log(`#${i} connection estabilished`) | |
} ) | |
sessions.push(socket) | |
} | |
for(let i = 0; i < 10000; i++) { | |
console.log('Performing #' + i) | |
setTimeout(() => makeSocket(i), 100) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment