This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const allContent = [] | |
function createCSV(data, fileName) { | |
const headers = [ | |
'id', | |
'email', | |
'firstName', | |
'lastName', | |
'postId', | |
'postText', |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"success": true, | |
"results": { | |
"locations": [ | |
{ | |
"custom_fields": "[]", | |
"description": "", | |
"email": "", | |
"extra": "NM", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy into a file called linkedinScrape.js (or whatever you want to call it) then call node linkedinScrape.js | |
const cookies = "" // your cookies | |
const page = 1 | |
const searchTerm = "marketing agency" | |
const results = await searchLinkedIn(searchTerm, page) | |
console.log(results) | |
export async function searchLinkedIn(query, page = 1) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// local setup | |
const browser = await puppeteerExtra.launch({ | |
headless: false, | |
args: [`--proxy-server=http://${ip}:${port}`], | |
// devtools: true, | |
executablePath: | |
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cheerio from "cheerio"; | |
function getHexValue(str, index) { | |
var hex = str.substr(index, 2); | |
return parseInt(hex, 16); | |
} | |
function decryptEmail(encodedEmail, startIndex) { | |
var decryptedEmail = "", | |
key = getHexValue(encodedEmail, startIndex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function createCSV(data, fileName) { | |
const headers = Object.keys(data[0]); | |
const csvContent = [ | |
headers.join(","), | |
...data.map((row) => | |
headers | |
.map((header) => { | |
const value = row[header]; | |
if (value === null) return "null"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"date": "2023-09-27", | |
"blocked": false, | |
"availableTickets": 1572, | |
"timeSlots": [ | |
{ | |
"time": "16:15", | |
"blocked": false, | |
"availableTickets": 50, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"ad_title": "Tijdelijk 14,95!", | |
"brand_name": "Lovinoshop", | |
"cost": 1, | |
"ctr": 0.04, | |
"favorite": false, | |
"id": "7134135044139253761", | |
"industry_key": "label_16105000000", | |
"is_search": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function scrollDown() { | |
const wrapper = document.querySelector("#search-page-list-container"); | |
await new Promise((resolve, reject) => { | |
var totalHeight = 0; | |
var distance = 600; | |
var timer = setInterval(async () => { | |
var scrollHeightBefore = wrapper.scrollHeight; | |
wrapper.scrollBy(0, distance); | |
totalHeight += distance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clickAccessEmailIfAvailable() { | |
const tbodys = document.querySelectorAll( | |
".finder-results-list-panel-content table tbody" | |
); | |
for (let i = 0; i < tbodys.length; i++) { | |
const tbody = tbodys[i]; | |
const buttons = tbody.querySelectorAll("button"); | |
// Create an array to store buttons with text including "Access Email" | |
const filteredButtons = []; |
NewerOlder