Skip to content

Commit

Permalink
buyee
Browse files Browse the repository at this point in the history
  • Loading branch information
JyyHuang committed Oct 16, 2023
1 parent 4f3bb5a commit 5df311f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vite-project/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"icons": {
"128": "./archivescraper.png"
},
"host_permissions": ["https://api.ebay.com/*"]
"host_permissions": ["https://*/"]
}
14 changes: 13 additions & 1 deletion vite-project/src/SearchForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,22 @@ export function SearchForm({callback, callBackSelected}) {
function checkSelected(event) {
if (callBackSelected == "eBay") {
eBayApiCall();
} else if (callBackSelected == "Buyee Auction"){
scrapeBuyeeAuction();
}
event.preventDefault();
}


// Scrape buyee
async function scrapeBuyeeAuction(){
const req = await fetch(`https://buyee.jp/item/search/query/${search}`
)

const html = await req.text();
console.log(html);
return ''
}

// get ebay AccessToken
function eBayApiCall() {

Expand Down

0 comments on commit 5df311f

Please sign in to comment.