Skip to content

Instantly share code, notes, and snippets.

@TrejGun
Last active November 12, 2024 07:25
Show Gist options
  • Save TrejGun/18e10de63ad374458ea10f04662ecd85 to your computer and use it in GitHub Desktop.
Save TrejGun/18e10de63ad374458ea10f04662ecd85 to your computer and use it in GitHub Desktop.
ScrapingBee
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