Superagent and cheerio get the content of Baidu's home page. Why do they get not the source code of the page, but the following lines of code?

1, Code:
const express = require ("express");

const superagent = require ("superagent");
const cheerio = require (" cheerio");
const app = express ();
const test = express ();
app.get ("/", (req, res,next) = > {

superagent.get("https://www.baidu.com/")
    .end((err, sres) => {
        if(err) {
            return next(err);
        }
        // sres.text  html  cheerio.load 
        //  jquery  `$`
        var $ = cheerio.load(sres.text);
        var items = [];
        console.log(sres.text);
        res.send(items);
    })

});

app.listen (3000,) = > {

console.log("app islistening at port 3000");

})

2. The result of console.log (sres.text) is as follows. Why didn"t you get the content when Baidu viewed the source code on the home page
3, < html >
< head >

<script>
    location.replace(location.href.replace("https://","http://"));
</script>

< / head >
< body >

<noscript><meta http-equiv="refresh" content="0;url=http://www.baidu.com/"></noscript>

< / body >
< / html >

I hope you can give me a lesson or two and explain why. Thank you!


is the problem with UA

superagent.get(cnodeUrl)
    .set('User-Agent','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3642.0 Safari/537.36')
    .end((err, sres) => {
        // ...you code
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea2908-1beb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea2908-1beb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?