diff options
Diffstat (limited to 'scrape.js')
-rw-r--r-- | scrape.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scrape.js b/scrape.js new file mode 100644 index 0000000..17d6169 --- /dev/null +++ b/scrape.js @@ -0,0 +1,17 @@ +const https = require("https"); + +async function urlOpen(path) +{ + return new Promise(resolve => + { + let req = https.get(path, res => + { + res.on("data", resolve); + }); + req.on("error", e => + { + console.error(e); + }); + req.end(); + }); +} |