Saturday 10 June 2017

Brake tags removed on x-ray scrape

I am new to JS. I am scraping a url with X-ray. The tags are removed when scraped as expected, but I want the <br> tag to be replaced with something like ;

For example: If I scrape something like 'span#scraped-portion'

<span id="scraped-portion"><span class="bold>NodeJS</span><br>
    <span class="bold>Version:</span> 8<br><span class="bold>Date released:</span> 2017 Jan<br><span class="bold>Description:</span>Some other text
</span>

I will get result similar to the following

NodeJS /n Version: 8Date released: 2017 JanDescription: Some other text

The text around <br> tags get added together and it will get difficult to understand what is what. So I want the <br> tag to be replaced replaced with something like ;.

Is it possible or Should I better use other libraries?



via Dilshod

No comments:

Post a Comment