Skip to content

Choose what to retrieve from inside <td> like innerHTML, outerHTML attribute etc.Β #11

@ghost

Description

I had an issue with a table that has trimmed text, the table contained anchors with file names as innerHTML and their download links as href which i needed to access to be able to get the names properly, So i had to edit the main source code like below:

line 62: before

this._results[tableIndex][index][this._headers[tableIndex][i] || (i + 1)] = this._$(cell).text().trim() 

line 62: after

this._results[tableIndex][index][this._headers[tableIndex][i] || (i + 1)] = this._$(cell).children('a').attr('href') || this._$(cell).text().trim() 

At first i've only put this._$(cell).children('a').attr('href') but then my other columns broke so i made it optional which works for my case, I'm not familiar with cherrio so i'm not sure if this would have any side effects so i thought i'd mention it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions