src/expresso24Tracker.js
function createExpressoEntity(html) {
    let $ = parser.load(html)

    let data = []
    $('table span').each(function (i, elem) {
        if(i >= 10 )
            data.push($(this).text().trim().replace(/\s\s+/g, ' '))
    })

    return new ExpressoInfo({
        'guide': data[0],
        'origin': data[1],
        'date': moment.tz(data[2], "YYYY-MM-DD", zone).format(),
        'status': data[3],
        'weight': data[4],
        'parcels': data[5],
        'receiver_name': data[6],
        'address': parseAddress(data[7]),
        'refund': data[8],
        'ref': data[9],
    })
}
function createExpressoEntity(html) {
    let $ = parser.load(html)

    let data = []
    $('table span').each(function (i, elem) {
        if(i >= 10 )
            data.push($(this).text().trim().replace(/\s\s+/g, ' '))
    })

    return new ExpressoInfo({
        'guide': data[0],
        'origin': data[1],
        'date': moment.tz(data[2], "YYYY-MM-DD", zone).format(),
        'status': data[3],
        'weight': data[4],
        'parcels': data[5],
        'receiver_name': data[6],
        'address': parseAddress(data[7]),
        'refund': data[8],
        'ref': data[9],
    })
}
function createExpressoEntity ( html ) { let $ = parser . load ( html ) let data = [ ] $ ( 'table span' ) . each ( function ( i , elem ) { if ( i >= 10 ) data . push ( $ ( this ) . text ( ) . trim ( ) . replace ( / \s\s+ / g , ' ' ) ) } ) return new ExpressoInfo ( { 'guide' : data [ 0 ] , 'origin' : data [ 1 ] , 'date' : moment . tz ( data [ 2 ] , "YYYY-MM-DD" , zone ) . format ( ) , 'status' : data [ 3 ] , 'weight' : data [ 4 ] , 'parcels' : data [ 5 ] , 'receiver_name' : data [ 6 ] , 'address' : parseAddress ( data [ 7 ] ) , 'refund' : data [ 8 ] , 'ref' : data [ 9 ] , } ) }
Create expresso entity from html
@param html
Create expresso entity from html