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 29, 2024
1 parent 78ef539 commit 597e48a
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 2 deletions.
25 changes: 25 additions & 0 deletions nodejs/amazon_pricing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
async function fetchAmazonData() {
try {
const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "amazon_product",
"query": "B09H74FXNW",
"parse": true,
"autoselect_variant": false
}),
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();
25 changes: 25 additions & 0 deletions nodejs/amazon_product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
async function fetchAmazonData() {
try {
const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "amazon_product",
"query": "B09H74FXNW",
"parse": true,
"autoselect_variant": false
}),
headers: {
"Content-Type": "application/json",
"Authorization": "Basic VTAwMDAxNjgwOTM6UFcxMDFkNDc0MjM5MTY2NGVhZDJkMTJiYjBjNTAwZjI3MzI="
}
});

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

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

fetchAmazonData();
24 changes: 24 additions & 0 deletions nodejs/amazon_questions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
async function fetchAmazonData() {
try {
const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "amazon_questions",
"query": "B09H74FXNW",
"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();
25 changes: 25 additions & 0 deletions nodejs/amazon_reviews.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
async function fetchAmazonData() {
try {
const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", {
method: "POST",
body: JSON.stringify({
"target": "amazon_reviews",
"query": "B09H74FXNW",
"page_from": "1",
"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();
4 changes: 2 additions & 2 deletions nodejs/amazon_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function fetchAmazonData() {
}),
headers: {
"Content-Type": "application/json",
"Authorization": "Basic [your basic authentication token]"
"Authorization": "Basic VTAwMDAxNjgwOTM6UFcxMDFkNDc0MjM5MTY2NGVhZDJkMTJiYjBjNTAwZjI3MzI="
}
});

Expand All @@ -22,4 +22,4 @@ async function fetchAmazonData() {
}
}

fetchAmazonData();
fetchAmazonData();

0 comments on commit 597e48a

Please sign in to comment.