Python 爬虫实战(一) 爬取自如网租房信息

$.ajax({
    type: "GET",
    url: ZRCONFIG.URL_GET_DETAIL_INFO 
    + "id=" + $("#room_id").val() 
    + "&house_id=" + $("#house_id").val(),
    success: function(data) {
        if (data.code == "200") {
            var dataObj = data.data;
            var priceTableList = dataObj.payment;
            var listArr = [];
            var trClass = "";
            var listStr = "";
            var priceStyle = "<style>.room_price i.num{background-image:url(" + dataObj.price[0] + ");}" 
            + "body.ratio2 .price i.num{background-image:url(" + dataObj.price[1] 
            + ");}.pay_price i.num,.text_r i.num{background-image:url(" + priceTableList[0].rent[0] + ");}" 
            + "body.ratio2 .pay_price i.num,body.ratio2 .text_r i.num{background-image:url(" 
            + priceTableList[0].rent[1] + ");background-size:auto 14px;}<style>";
            $("head").append(priceStyle);
            var priceListHtml = "";
            for (var j = 0; j < dataObj.price[2].length; j++) {
                priceListHtml += '<i class="num" style="background-position:-' 
                + (dataObj.price[2][j] * offset_unit) 
                + 'px"></i>'
            }
... ... (省略其他代码)

版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!
本文链接:https://zdran.com/20190420.html