MCPcopy Create free account
hub / github.com/SoHeil-R/google-traffic-bot / proxyServer

Function proxyServer

libs/index.js:122–149  ·  view source on GitHub ↗
(url, keyboard)

Source from the content-addressed store, hash-verified

120}
121
122async function proxyServer(url, keyboard){
123 var options = new chrome.Options()
124 PERMISSIONS.forEach(perms => {
125 options.addArguments(perms)
126 })
127 options.excludeSwitches('enable-logging')
128 var driver = await new webDriver.Builder().forBrowser('chrome').setChromeService(chromedriver).setChromeOptions(options).build()
129 await Stealth(driver)
130 await driver.get('https://www.blockaway.net').then(async()=>{
131 await driver.findElement(webDriver.By.id('url')).sendKeys('https://www.google.com/')
132 await driver.findElement(webDriver.By.id('requestSubmit')).click()
133 await delay(12000)
134 var accept_cookies = await driver.findElements(webDriver.By.className('QS5gu sy4vM'))
135 await accept_cookies[0]?.click()
136 await driver.findElement(webDriver.By.className('gLFyf')).sendKeys(keyboard)
137 var elements = await driver.findElements(webDriver.By.className('gNO89b'))
138 await elements[1].click()
139 await delay(1000)
140 var pageId = await findSiteUrl(driver, url)
141 await delay(2000)
142 if (pageId == -1)
143 pageId = await nextPage(driver, url)
144 await delay(1000)
145 console.log(pageId)
146 await clickPage(driver, pageId)
147 driverList.push({driver: driver, time: Date.now()})
148 })
149}
150
151
152

Callers 1

mainFunction · 0.85

Calls 5

StealthFunction · 0.85
delayFunction · 0.85
findSiteUrlFunction · 0.85
nextPageFunction · 0.85
clickPageFunction · 0.85

Tested by

no test coverage detected