Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sakanamk authored May 28, 2024
1 parent 8d40eaf commit 78ef539
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions nodejs/amazon_bestsellers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
async function fetchAmazonData() {
try {
const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "amazon_bestsellers",
"query": "sports-collectibles",
"page_from": "1",
"num_pages": "10",
"parse": true,
}),
headers: {
"Content-Type": "application/json",
"Authorization": "Basic [your basic authentication token]"
}
});

const data = await response.json();
console.log(JSON.stringify(data));

} catch (error) {
console.log(error);
}
}

fetchAmazonData();

0 comments on commit 78ef539

Please sign in to comment.