Created
May 6, 2020 12:38
-
-
Save GursheeshSingh/8a9632928823a023acb9316f31affd1b to your computer and use it in GitHub Desktop.
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 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