Skip to content

Instantly share code, notes, and snippets.

View omisolaidowu's full-sized avatar

Omisola Idowu Paul omisolaidowu

View GitHub Profile
@omisolaidowu
omisolaidowu / scraper.js
Last active February 1, 2024 01:21
Initial
// import the required libraries
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
// set the path to udetected_chromedriver executable file
const chromeDriverPath = 'C:/Users/dell/AppData/Roaming/undetected_chromedriver/undetected_chromedriver.exe';
// set the path to your actual Chrome browser executable file
const chromeExePath = 'C:/Program Files/Google/Chrome/Application/chrome.exe';
@omisolaidowu
omisolaidowu / install.sh
Created January 31, 2024 12:36
install-initial
pip install undetected-chromedriver
@omisolaidowu
omisolaidowu / result.sh
Created January 30, 2024 21:36
result accessed
<!DOCTYPE html>
<!-- ... -->
<head>
<title>Asana Reviews 2024</title>
</head>
<body>
<!-- ... other page content ignored for brevity -->
@omisolaidowu
omisolaidowu / scraper.js
Created January 30, 2024 21:30
accessed
// import axios
const axios = require('axios');
const url = 'https://www.g2.com/products/asana/reviews';
axios({
url: 'https://api.zenrows.com/v1/',
method: 'GET',
params: {
'url': url,
<!DOCTYPE html>
<html class="no-js" lang="en-US">
<head>
<title>Attention Required! | Cloudflare</title>
</head>
<body>
<!-- ... other page content ignored for brevity -->
</body>
</html>
@omisolaidowu
omisolaidowu / scraper.js
Last active February 1, 2024 01:21
full code G2
// import the required libraries
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
// set the path to udetected_chromedriver executable file
const chromeDriverPath = 'C:/Users/dell/AppData/Roaming/undetected_chromedriver/undetected_chromedriver.exe';
// set the path to your actual Chrome browser executable file
const chromeExePath = 'C:/Program Files/Google/Chrome/Application/chrome.exe';
@omisolaidowu
omisolaidowu / scraper.js
Last active January 31, 2024 12:44
scraper function
// ...
// navigate to a website
async function scraper() {
try {
await driver.get('https://www.g2.com/products/asana/reviews');
// extract the page HTML
const pageSource = await driver.getPageSource();
console.log('Page HTML:', pageSource);
@omisolaidowu
omisolaidowu / scraper.js
Last active February 1, 2024 01:16
scraper
// ...
// create a new WebDriver instance
const driver = new Builder()
.forBrowser('chrome')
.setChromeOptions(chromeOptions)
.setChromeService(new chrome.ServiceBuilder(chromeDriverPath))
.build();
@omisolaidowu
omisolaidowu / result.sh
Created January 30, 2024 20:06
page html
<!DOCTYPE html>
<html lang="en">
<head>
<title>nowSecure</title>
</head>
<body>
<!-- ... -->
<h1>OH YEAH, you passed!</h1>
@omisolaidowu
omisolaidowu / test.js
Created January 30, 2024 19:54
final code
// import the required libraries
const { Builder } = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
// set the path to udetected_chromedriver executable file
const chromeDriverPath = 'C:/Users/dell/AppData/Roaming/undetected_chromedriver/undetected_chromedriver.exe';
// set the path to your actual Chrome browser executable file
const chromeExePath = 'C:/Program Files/Google/Chrome/Application/chrome.exe';