This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Web Scraping Example</title> | |
</head> | |
<body> | |
<article id="main"> | |
<p>This text was added with JavaScript.</p> | |
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Web Scraping Example</title> | |
</head> | |
<body> | |
<article id="main"> | |
<p>I've been scraped!</p> | |
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scraperapiClient = require('scraperapi-sdk')(YOUR_API_KEY); | |
async function scrapePage(){ | |
const scrapeUrl = 'http://examples.kevinchisholm.com/scrape-me/' | |
const scrapeResponse = await scraperapiClient.get(scrapeUrl, {render: true}) | |
console.log(scrapeResponse); | |
} | |
scrapePage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scraperapiClient = require('scraperapi-sdk')(YOUR_API_KEY); | |
async function scrapePage(){ | |
const scrapeUrl = 'http://examples.kevinchisholm.com/scrape-me/' | |
const scrapeResponse = await scraperapiClient.get(scrapeUrl) | |
console.log(scrapeResponse); | |
} | |
scrapePage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "scraper-api-example", | |
"version": "1.0.0", | |
"description": "Scraper API Example", | |
"main": "app.js", | |
"author": "Kevin Chisholm", | |
"license": "ISC", | |
"dependencies": { | |
"scraperapi-sdk": "^1.0.6" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.hats = async (event, context) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: 'This is the HATS endpiont.' | |
}), | |
}; | |
}; | |
module.exports.shoes = async (event, context) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: my-service | |
plugins: | |
- serverless-domain-manager | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: ${opt:stage, "dev"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "create-a-custom-domain-name-for-your-aws-lambda", | |
"devDependencies": { | |
"serverless-domain-manager": "^3.3.1" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"message":"Decrypted Secret: foo-bar-baz"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.getSecret = async (event, context) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: `Decrypted Secret: ${process.env.myApiKey}` | |
}) | |
}; | |
}; |
NewerOlder