Skip to content

Commit

Permalink
add file-api to supported urls
Browse files Browse the repository at this point in the history
  • Loading branch information
louisholley committed Jul 10, 2024
1 parent 6cf6c7f commit 677b882
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const SUPPORTED_URLS = [
"https://fs-emulator.fxhash-dev.xyz/",
"https://fs-emulator.fxhash.xyz/",
"https://fs-emulator.fxhash2.xyz/",
"https://file-api.fxhash-dev.xyz/",
"https://file-api.fxhash.xyz/",
"https://onchfs.fxhash-dev2.xyz/",
"https://onchfs.fxhash2.xyz/",
"https://onchfs.fxhash.xyz/",
Expand Down Expand Up @@ -386,7 +388,7 @@ exports.handler = async (event, context) => {
response = await page.goto(url, {
timeout: PAGE_TIMEOUT,
})
console.log(`navigated to URL with response status: ${response.status()}`);
console.log(`navigated to URL with response status: ${response.status()}`)
} catch (err) {
console.log(err)
if (err && err.name && err.name === "TimeoutError") {
Expand All @@ -403,9 +405,9 @@ exports.handler = async (event, context) => {
const processCapture = async () => {
const capture = await performCapture(mode, page, canvasSelector)
const features = (await extractFeatures(page)) || []
console.log("uploading capture to S3...");
console.log("uploading capture to S3...")
const upload = await uploadToS3(context, capture, features)
console.log("successfully uploaded capture to S3");
console.log("successfully uploaded capture to S3")
return upload
}

Expand Down

0 comments on commit 677b882

Please sign in to comment.