It is about time to have a Coding Forum in here

BlackMickey

Newbie
Joined
Mar 14, 2021
Messages
38
Reaction score
16
I see a lot of folks talking about bots, scraping data and even some hacking.

So I guess we should have a place to discuss this type of thing more properly


BTW, I am having some trouble with a js script with playwright:

var csvsync = require('csvsync');
var fs = require('fs');

var csv = fs.readFileSync('sites.csv');
var data = csvsync.parse(csv);

const { chromium } = require('playwright');

(async () => {

const promises = [];


const browser = await chromium.launch({
headless: false
});
const context = await browser.newContext();

// Open new page
const page = await context.newPage();

for(let i = 0; i <= data.length; i++) {
// Go to https://www.google.com.br/?gws_rd=ssl
await page.goto(`${data}`);

await Promise.all(promises);
}
await Promise.all(promises);
// ---------------------
await context.close();
await browser.close();

})();


How can I make a loop inside an async function? I just wanna read some stuff form a csv and use it later multiple times
 
You already have that boss.

https://www.blackhatworld.com/forums/programming.79/https://www.blackhatworld.com/forums/scripting.59/
Asked -- Answered - Closed
 
Back
Top