Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rp = require('request-promise');
- var cheerio = require('cheerio');
- var sleep = require('system-sleep');
- var link;
- function getLobby() {
- while(link == null || link == 'steam://') {
- console.log('Trying get a link.');
- rp('http://steamcommunity.com/id/РАНДОМНЫЙ_ID').then(function steam(html) {
- var $ = cheerio.load(html);
- link = $('.btn_green_white_innerfade.btn_small_thin').attr('href');
- module.exports.link = link;
- });
- sleep(5000);
- }
- return link;
- }
- function postLobby() {
- var options = {
- method: 'POST',
- uri: 'https://localhost/add',
- form: {
- lobby_link: getLobby(),
- max_rank: 'DMG',
- afk: '1',
- win_rounds: '3'
- },
- headers: {
- 'Cookie': 'Много печенья'
- }
- }
- rp(options);
- }
- var i = 0;
- while(true) {
- postLobby();
- sleep(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement