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 axios from "axios"; | |
| import * as cheerio from "cheerio"; | |
| async function scrapeBingSearch(q) { | |
| let query = q || "Hello, World!"; | |
| const url = 'https://www.bing.com/search?q=' + encodeURIComponent(query); | |
| try { | |
| const { data: html } = await axios.get(url, { | |
| headers: { | |
| 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', |
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 axios from "axios"; | |
| import * as cheerio from "cheerio" | |
| async function scrapeNasa() { | |
| try { | |
| const { data: html } = await axios.get('https://www.nasa.gov/', { | |
| headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' } | |
| }); | |
| const $ = cheerio.load(html); |
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
| weirdcore = { | |
| "A": "?", | |
| "B": "☻", | |
| "C": "Θ", | |
| "D": "♠", | |
| "E": "3", | |
| "F": "O", | |
| "G": "8", | |
| "H": "☹", | |
| "I": "5", |
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
| This is gist. | |
| There are many like it, but this one is mine. | |
| It is my life. | |
| I must master it as I must master my life. | |
| Without me gist is useless. | |
| Without gist, I am useless. |