This file contains hidden or 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
| [ | |
| { | |
| "inputUrl": "https://www.instagram.com/jane/reel/DaGfedtvfIU/", | |
| "id": "3928966157859418644", | |
| "type": "Video", | |
| "shortCode": "DaGfedtvfIU", | |
| "caption": "Omg! I almost cared💅\n\n#dietcoke #soda #momlife #relatable #mommylife", | |
| "hashtags": [ | |
| "dietcoke", | |
| "soda", |
This file contains hidden or 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 contains hidden or 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"; | |
| import puppeteerExtra from "puppeteer-extra"; | |
| import stealthPlugin from "puppeteer-extra-plugin-stealth"; | |
| import chromium from "@sparticuz/chromium"; | |
| async function searchGoogleMaps() { | |
| try { | |
| const start = Date.now(); | |
| puppeteerExtra.use(stealthPlugin()); |
This file contains hidden or 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
| FROM node:20-bullseye | |
| # Install Chrome and xvfb | |
| RUN apt-get update && apt-get install -y \ | |
| chromium \ | |
| xvfb \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /usr/src/app |
This file contains hidden or 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 fs from 'fs'; | |
| import { createClient } from '@supabase/supabase-js'; | |
| const SUPABASE_URL = process.env.SUPABASE_URL; | |
| const SUPABASE_KEY = process.env.SUPABASE_KEY; | |
| const supabase = createClient(SUPABASE_URL, SUPABASE_KEY); | |
| const filePath = 'video.mp4'; | |
| const bucket = 'videos'; // change to your bucket | |
| const storagePath = `uploads/${filePath}`; |
This file contains hidden or 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 res = await axios.get( | |
| "https://api.scrapecreators.com/v2/tiktok/video?url=https://www.tiktok.com/@stoolpresidente/video/7552934044887944478", | |
| { | |
| headers: { | |
| "x-api-key": process.env.MY_API_KEY, | |
| }, | |
| } | |
| ); | |
| const rawVideo = res?.data?.aweme_detail?.video?.play_addr?.url_list?.[0]; | |
| console.log("rawVideo", rawVideo); |
This file contains hidden or 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 languageMenu = findKey(transcriptRes, "languageMenu"); | |
| console.log("languageMenu", languageMenu); | |
| const language = | |
| languageMenu?.sortFilterSubMenuRenderer?.subMenuItems?.[0]?.title?.split( | |
| " " | |
| )?.[0]; | |
| const transcriptRenderer = findKey(transcriptRes, "transcriptRenderer") | |
| ?.content?.transcriptSearchPanelRenderer?.body?.transcriptSegmentListRenderer?.initialSegments?.map( | |
| (tr) => tr?.transcriptSegmentRenderer |
This file contains hidden or 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 jsonifyDuckDuckGo(html) { | |
| try { | |
| const $ = cheerio.load(html); | |
| const results = []; | |
| $(".results_links") | |
| .get() | |
| .forEach((result) => { |
This file contains hidden or 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 to recursively search for the key | |
| export function findKey(obj, keyToFind) { | |
| try { | |
| if (obj.hasOwnProperty(keyToFind)) { | |
| return obj[keyToFind]; | |
| } | |
| for (let key in obj) { | |
| if (typeof obj[key] === "object" && obj[key] !== null) { | |
| let result = findKey(obj[key], keyToFind); |
This file contains hidden or 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, | |
| "categories": [ | |
| { | |
| "category_id": "700645", | |
| "level": 1, | |
| "is_leaf": false, | |
| "parent_id": "0", | |
| "category_name": "Saúde", | |
| "name_key": "magellan_700645" |
NewerOlder