├── LICENSE ├── README.md ├── pfp.gif └── pfp.js /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Pix 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Discord-PFP-Scraper-v2 2 | just a better version from last time 3 | 4 | # Tested Sites 5 | ```Nim 6 | 1. [Supported] Pintrest [Gifs Wont Work] 7 | 2. [Supported] WeHeartIt [ some what buggy / gifs dont work] 8 | 3. [Not Supported] giphy [link redirects to first pic] 9 | 4. [Supported] Tenor [wont work] 10 | 5. [Supported] davidbaptistechirot.blogspot.com [wont work great for gifs] 11 | dm eozri#0070 if u find other websites that support either gif or png/jpg yk 12 | ``` 13 | # Installations 14 | ``` 15 | npm i ora 16 | npm i discord.js 17 | npm i chalk 18 | npm i request 19 | npm i enquirer 20 | npm i puppeteer 21 | npm i node-fetch 22 | ``` 23 | # How To Run 24 | ``` 25 | node pfp.js 26 | ``` 27 | 28 | # What It Looks Like 29 | 30 | ![](pfp.gif) 31 | 32 | # @oxy 33 | <3 34 | -------------------------------------------------------------------------------- /pfp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/p-qq/Discord-PFP-Scraper-v2/6b2c60f7a4f15e268dc952fc5bfc60e9f589d1fb/pfp.gif -------------------------------------------------------------------------------- /pfp.js: -------------------------------------------------------------------------------- 1 | const ora = require('ora'); 2 | const chalk = require('chalk') 3 | const Spinner = ora({ color: 'red' }); 4 | const { prompt } = require('enquirer'); 5 | const white = chalk.hex('#FFFFFF'); 6 | const red = chalk.hex('#DC143C'); 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | const logo = (` 16 | ${chalk.hex('#FFFFFF')(" ┌┼┐ ╦╔═ ╔═╗ ╔╦╗ ╔═╗ ╔╦╗ ╔╦╗ ╦ ╔═╗")} 17 | ${chalk.hex('#8D8C8C')(" └┼┐ ╠╩╗ ╠═╣ ║║ ╠═╣ ║║ ║║ ║ ║╣")} 18 | ${chalk.hex('#DC143C')(" └┼┘ ╩ ╩ ╩ ╩ ═╩╝ ╩ ╩ ═╩╝ ═╩╝ ╩═╝ ╚═╝")} 19 | `) 20 | 21 | console.log(logo) 22 | 23 | let originalConsoleLog = console.log; 24 | porn = function() { 25 | args = []; 26 | let date = new Date(); 27 | 28 | let hours = date.getUTCHours().toString().padStart(2, '0'); 29 | let minutes = date.getUTCMinutes().toString().padStart(2, '0'); 30 | let seconds = date.getUTCSeconds().toString().padStart(2, '0'); 31 | args.push(`${white(`[${red(`${hours}:${minutes}:${seconds}`)}]`)}`); 32 | for (let i = 0; i < arguments.length; i++) { 33 | args.push(arguments[i]); 34 | } 35 | originalConsoleLog.apply(console, args); 36 | } 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | async function Main() { 47 | const letters = ['$ ', 'K ', 'A ', 'D ', 'A ', 'D ', 'D ', 'L ', 'E']; 48 | let pusher = ""; 49 | letters.forEach((l, i) => { 50 | setTimeout(() => { 51 | pusher += l; 52 | process.title = pusher; 53 | }, i * 75); 54 | }) 55 | let res = await prompt({ 56 | type: 'input', 57 | name: 'url', 58 | message: `Please give me a url to start scanning` 59 | }) 60 | let res2 = await prompt({ 61 | type: 'password', 62 | name: 'webhook', 63 | message: `Which webhook would you like the images to be sent?` 64 | }) 65 | const Discord = require('discord.js'); 66 | res2.webhook = res2.webhook.replace(/https:\/\/discord\.com\/api\/webhooks\//g, '').replace(/https:\/\/canary\.discord\.com\/api\/webhooks\//g, ''); 67 | const Webhook = res2.webhook.split('/') 68 | const webhook = new Discord.WebhookClient(Webhook[0], Webhook[1]) 69 | 70 | if (!res.url) return Main() 71 | const url = res.url; 72 | const fetch = require('node-fetch') 73 | const puppeteer = require('puppeteer') 74 | const options = { 75 | headless: true, 76 | args: [ 77 | '--no-sandbox', 78 | '--disable-setuid-sandbox', 79 | ] 80 | } 81 | const browser = await puppeteer.launch(options) 82 | 83 | const page = (await browser.pages())[0] || await browser.newPage() 84 | 85 | const pageDown = async() => { 86 | const scrollHeight = 'document.body.scrollHeight'; 87 | let previousHeight = await page.evaluate(scrollHeight); 88 | await page.evaluate(`window.scrollTo(0, ${scrollHeight})`); 89 | await page.waitForFunction(`${scrollHeight} > ${previousHeight}`, { 90 | timeout: 30000 91 | }) 92 | } 93 | 94 | Spinner.start(`skadaddle is now scanning ${url}...`) 95 | await page.goto(url) 96 | const getPages = () => page.evaluate(() => window.document.querySelectorAll('[data-test-id=pinGrid]')[0].querySelectorAll('img[src]').length) 97 | let prev = await getPages() 98 | while (true) { 99 | await pageDown() 100 | const pages = await getPages() 101 | Spinner.text = `skadaddle found ${pages} images within the page` 102 | if (pages >= 200) { 103 | break; 104 | } 105 | if (prev === pages) { 106 | break 107 | } 108 | 109 | prev = pages 110 | } 111 | 112 | const urls = await page.evaluate(() => Array.from(window.document.querySelectorAll('[data-test-id=pinGrid]')[0].querySelectorAll('img[src]').values()).map(r => r.getAttribute('src'))) 113 | Spinner.succeed(`skadaddle has found ${urls.length} urls to send`) 114 | console.clear() 115 | console.log(logo) 116 | await Promise.all(urls.map(link => { 117 | return fetch(link).then(res => new Promise((resolve, reject) => { 118 | webhook.send({ 119 | "content": null, 120 | "embeds": [ 121 | { 122 | "color": 0, 123 | "author": { 124 | "name": "Pix's TESTING", 125 | "url": `${link}`, 126 | "icon_url": `${link}` 127 | }, 128 | "footer": { 129 | "text": "powered by skadaddle", 130 | "icon_url": "https://cdn.discordapp.com/icons/815155331348561920/eb90ec21afe30f712500eca717cd2133.png?size=4096" 131 | }, 132 | "image": { 133 | "url": `${link}` 134 | } 135 | } 136 | ], 137 | "username": "pix", 138 | "avatarURL": "https://cdn.discordapp.com/attachments/823616607942869042/823626290195202048/image0.jpg" 139 | },porn(`SENDING » ${red(`${link}`)}`)) 140 | }).catch(e => console.log(`[Error] ${red(e.message)}`))) 141 | })) 142 | } 143 | 144 | 145 | 146 | Main() --------------------------------------------------------------------------------