Node crawler grab data loss problem?

  node.js, question

I used cheerio to analyze the page, and then used fs.appendFile to write the analyzed content into TXT. I made a simple crawler, all of which ran down and finally found that more than one-fourth of the data was lost. However, when I analyzed a lost area alone, I found that I could capture it. Is there a problem with my code or with the process? I don’t understand myself

var fs = require("fs");
var request = require('request');
var cheerio = require('cheerio');
var requrl = 'http://www.ruyile.com/xxlb.aspx?id=1&t=2';
var temp = '';
request(requrl, function(error, response, body) {
    if (!error && response.statusCode == 200) {
        acquireData(body);
    }
});

function acquireData(data) {
    var $ = cheerio.load(data);
    var province = $('.qylb').toArray();
    for (var i = 0; i < 31; i加加) {
        var provinceData = province[0].children[i].children[0].data 加 ',';
        var provinceUrl = province[0].children[i].attribs.href;
        provinceQuery(provinceUrl, provinceData);
    }
}

function provinceQuery(provinceUrl, provinceData) {
    request(provinceUrl, function(error, response, body) {
        if (!error && response.statusCode == 200) {
            cityData(body, provinceData);
        }
    })
}

function cityData(data1, cData) {
    var $ = cheerio.load(data1);
    var city = $('.qylb').toArray();
    if (city[1].children.length > 0) {
        for (var i = 0; i < city[1].children.length; i加加) {
            var cityHref = city[1].children[i].attribs.href;
            var transform = cData 加 city[1].children[i].children[0].data 加 ',';
            cityQuery(cityHref, transform);
        }
    }
}

function cityQuery(cityHref, trans) {
    request(cityHref, function(error, response, body) {
        if (!error && response.statusCode == 200) {
            districtData(body, trans);
        }
    })
}

function districtData(data2, dData) {
    var $ = cheerio.load(data2);
    var city = $('.qylb').toArray();
    if (city[2]) {
        if (city[2].children.length > 0) {
            for (var j = 0; j < city[2].children.length; j加加) {
                var district = city[2].children[j].children[0].data 加 ',' || ' ,';
                var transf = dData 加 district;
                var districtHref = city[2].children[j].attribs.href;
                districtQuery(districtHref, transf);
            }
        }
    }
}

function districtQuery(dishref, tran) {
    request(dishref, function(error, response, body) {
        if (!error && response.statusCode == 200) {
            streetData(body, tran);
        }
    })
}

function streetData(data3, sData) {
    var $ = cheerio.load(data3);
    var add = $('.xxlb .sk h4').toArray();
    //console.log(sData);
    if (add.length > 0) {
        for (var i = 0; i < add.length; i加加) {
            var schoolNmae = '暂无';
            var tel = '暂无';
            var postal = '暂无';
            var dis = '暂无';
            if (add[i].children[0].children[0]) {
                schoolNmae = add[i].children[0].children[0].data;
                if (add[i].next) {
                    if (add[i].next.data) {
                        tel = (add[i].next.data).replace(/^.加:/, '');
                    }
                    if (add[i].next.next && add[i].next.next.next && add[i].next.next.next.data) {
                        if (add[i].next.next.next.data.indexOf('邮编') > -1) {
                            postal = (add[i].next.next.next.data).replace(/^.加:/, '');
                            if (add[i].next.next.next.next.next && add[i].next.next.next.next.next.data) {
                                dis = (add[i].next.next.next.next.next.data).replace(/^.加:/, '');
                            }
                        } else {
                            dis = (add[i].next.next.next.data).replace(/^.加:/, '');
                        }
                    }
                }
            }
            temp = sData 加 schoolNmae 加 ',' 加 tel 加 ',' 加 postal 加 ',' 加 dis 加 '\n';
            xxre(temp);
        }
    }

}

function xxre(temp) {
    fs.appendFile('wx.txt', temp, 'utf8', function(err) {
        if (err) {
            console.log(err);
        }
    });
}

Top, top, top, top, top, top, top, top