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 to handle JSON or encrypted response | |
let decryptResponse = async (response) => { | |
let result; | |
// These are Base64 encoded arrays used as the key and IV for AES-GCM decryption | |
let base64IV = | |
"Wzk3LCAxMDksIC0xMDAsIC05MCwgMTIyLCAtMTI0LCAxMSwgLTY5LCAtNDIsIDExNSwgLTU4LCAtNjcsIDQzLCAtNzUsIDMxLCA3NF0="; | |
let base64Key = | |
"Wy0zLCAtMTEyLCAxNSwgLTEyNCwgLTcxLCAzMywgLTg0LCAxMDksIDU3LCAtMTI3LCAxMDcsIC00NiwgMTIyLCA0OCwgODIsIC0xMjYsIDQ3LCA3NiwgLTEyNywgNjUsIDc1LCAxMTMsIC0xMjEsIDg5LCAtNzEsIDUwLCAtODMsIDg2LCA5MiwgLTQ2LCA0OSwgNTZd"; |
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 fetch from "node-fetch"; | |
import * as cheerio from "cheerio"; | |
import fs from "graceful-fs"; | |
import { gotScraping } from "got-scraping"; | |
import { | |
getAllItemsFromSupabaseTable, | |
getProxyAgent, | |
getProxyUrl, | |
getSmartProxyUrl, | |
supabase, |
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, |
NewerOlder