Last active
November 12, 2024 07:25
-
-
Save TrejGun/18e10de63ad374458ea10f04662ecd85 to your computer and use it in GitHub Desktop.
ScrapingBee
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 { ScrapingBeeClient } = require('scrapingbee') | |
async function get(url) { | |
const client = new ScrapingBeeClient("API_KEY") | |
return client.get({ | |
url, | |
params: { | |
json_response: true, | |
screenshot_full_page: true, | |
block_ads: true, | |
}, | |
}) | |
} | |
get('https://ethberry.io/') | |
.then((response) => { | |
const decoder = new TextDecoder() | |
const text = JSON.parse(decoder.decode(response.data)) | |
console.log(text) | |
}) | |
.catch(console.error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment