UNPKG
romtool
Version:
latest (1.2.0)
1.2.0
1.1.0
1.0.4
1.0.3
1.0.0
Collection of tools for managing your PSX rom collection
github.com/jordond/romtool
jordond/romtool
romtool
/
src
/
utils
/
scraper.js
15 lines
(12 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const
xray =
require
(
"x-ray"
)();
function
scrape
(
url, fields
) {
return
new
Promise
(
(
resolve, reject
) =>
{
xray
(url, fields)(
(
err, result
) =>
{
if
(err) {
return
reject
(err); }
return
resolve
(result); }); }); }
module
.
exports
= scrape;