Skip to content

Instantly share code, notes, and snippets.

@CovertCode
Last active September 17, 2019 17:14
Show Gist options
  • Save CovertCode/3440d850518bf46b49f33a7abc0f410c to your computer and use it in GitHub Desktop.
Save CovertCode/3440d850518bf46b49f33a7abc0f410c to your computer and use it in GitHub Desktop.
const pupptier = require("puppeteer");
const px01 = require("./px01");
const px02 = require("./px02");
const px03 = require("./px02");
const px04 = require("./px02");
const px05 = require("./px02");
const px06 = require("./px02");
const px07 = require("./px02");
const px08 = require("./px02");
const px09 = require("./px02");
const px010 = require("./px02");
var deviceList = [
"Nexus 6P",
"Nexus 6",
"Galaxy Note II landscape",
"Galaxy S III landscape",
"Galaxy S5",
"Pixel 2 XL",
"Nexus 7",
"Nexus 10 landscape",
"iPhone 7 landscape",
"iPhone 5",
"iPad Mini",
"Galaxy Note 3",
"Blackberry PlayBook landscape",
"Blackberry PlayBook"
];
(() => {
var rand = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice = pupptier.devices[rand];
var rand2 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice2 = pupptier.devices[rand2];
var rand3 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice3 = pupptier.devices[rand3];
var rand4 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice4 = pupptier.devices[rand4];
var rand5 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice5 = pupptier.devices[rand5];
var rand6 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice6 = pupptier.devices[rand6];
var rand7 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice7 = pupptier.devices[rand7];
var rand8 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice8 = pupptier.devices[rand8];
var rand9 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice9 = pupptier.devices[rand9];
var rand10 = deviceList[Math.floor(Math.random() * deviceList.length)];
var myDevice10 = pupptier.devices[rand10];
Promise.all([
px01.initialize("proxy:port", myDevice),
px02.initialize("proxy:port", myDevice2),
px03.initialize("proxy:port", myDevice3),
px04.initialize("proxy:port", myDevice4),
px05.initialize("proxy:port", myDevice5),
px06.initialize("proxy:port", myDevice6),
px07.initialize("proxy:port", myDevice7),
px08.initialize("proxy:port", myDevice8),
px09.initialize("proxy:port", myDevice9),
px010.initialize("proxy:port", myDevice10)
]);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment