Skip to content

Instantly share code, notes, and snippets.

View adrianhorning08's full-sized avatar

Adrian Horning adrianhorning08

View GitHub Profile
@adrianhorning08
adrianhorning08 / index.json
Created May 8, 2024 16:18
Trojan Battery Locations
This file has been truncated, but you can view the full file.
{
"success": true,
"results": {
"locations": [
{
"custom_fields": "[]",
"description": "",
"email": "",
"extra": "NM",
"extra2": "",
@adrianhorning08
adrianhorning08 / index.js
Last active April 19, 2024 02:22
Scraping Linkedin Search Results
// 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 {
@adrianhorning08
adrianhorning08 / index.js
Created January 19, 2024 19:26
Proxy Puppeteer
// 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",
});
@adrianhorning08
adrianhorning08 / index.js
Created January 10, 2024 22:21
How to decrypt emails on cloudflare protected sites
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);
@adrianhorning08
adrianhorning08 / index.js
Created January 5, 2024 23:35
Create CSV on frontend
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";
@adrianhorning08
adrianhorning08 / tickets.json
Last active September 27, 2023 18:16
Tickets
[
{
"date": "2023-09-27",
"blocked": false,
"availableTickets": 1572,
"timeSlots": [
{
"time": "16:15",
"blocked": false,
"availableTickets": 50,
[
{
"ad_title": "Tijdelijk 14,95!",
"brand_name": "Lovinoshop",
"cost": 1,
"ctr": 0.04,
"favorite": false,
"id": "7134135044139253761",
"industry_key": "label_16105000000",
"is_search": true,
@adrianhorning08
adrianhorning08 / zillowScraper.js
Last active April 5, 2024 07:59
Zillow Scraper
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;
@adrianhorning08
adrianhorning08 / apollo.js
Created September 10, 2023 19:15
Apollo Scraper
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 = [];
{"name":"Chef Art Smith's Homecomin'","location":"Disney Springs, The Landing","destinationId":"WDW","mealPeriodsList":[{"name":"Brunch","label":"Brunch"},{"name":"Lunch","label":"Lunch"},{"name":"Dinner","label":"Dinner"}],"mealPeriods":[{"name":"Brunch","label":"Brunch","experience":"Casual Dining","serviceStyle":"A la Carte","groups":[{"name":"Sunrise Starters","type":"Appetizer","mickeyCheckItems":false,"items":[{"title":"Biscuits","priceValue":10,"description":"Cheddar cheese drop biscuits served with choice of blackberry fig jam or sawmill gravy","currency":"USD"},{"title":"Everglazed Doughnuts","priceValue":10,"description":"Mini glazed doughnuts, baked fresh daily by our neighbors at Everglazed! Topped with pecans and bacon for $2","currency":"USD"},{"title":"Bee Haven Bay Fried Green Tomatoes","priceValue":17,"description":"Shaved ham, rémoulade sauce, and dressed local greens","currency":"USD"},{"title":"Church Lady Deviled Eggs","priceValue":14,"description":"HFK-style whole deviled eggs","currency