Skip to content

Instantly share code, notes, and snippets.

@GursheeshSingh
Created May 6, 2020 12:38
Show Gist options
  • Save GursheeshSingh/8a9632928823a023acb9316f31affd1b to your computer and use it in GitHub Desktop.
Save GursheeshSingh/8a9632928823a023acb9316f31affd1b to your computer and use it in GitHub Desktop.
const request = require("request");
request(
"https://baylorbears.com/sports/2018/5/16/ot-live-stats-html.aspx",
{
json: true,
headers: {
"User-Agent":
//Requesting as a browser
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)" +
"Chrome/54.0.2840.100 Safari/537.36",
},
},
(err, res, body) => {
if (err) {
return console.log(err);
}
console.log(request);
console.log(res.statusCode);
console.log(body);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment