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() {
- console.log('Trying get a link.');
- rp('http://steamcommunity.com/id/steam_id').then(function(html) {
- var $ = cheerio.load(html);
- link = $('.btn_green_white_innerfade.btn_small_thin').attr('href');
- postLobby(link);
- });
- }
- function postLobby(link) {
- var options = {
- method: 'POST',
- uri: 'https://localhost/add',
- form: {
- lobby_link: link ,
- max_rank: 'DMG',
- afk: '1',
- win_rounds: '3'
- },
- headers: {
- 'Cookie': 'Много печенья'
- }
- }
- rp(options);
- }
- setInterval(getLobby, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement