STEP 9. CLEANING DATA

Discuss hot database and enhance operational efficiency together.
Post Reply
hasibaakterss3309
Posts: 737
Joined: Thu Jan 02, 2025 7:46 am

STEP 9. CLEANING DATA

Post by hasibaakterss3309 »

[<p class=”description”>Asus VivoBook X441NA-GA190 Chocolate Black, 14", Celeron N3450, 4GB, 128GB SSD, Endless OS, ENG kbd</p>,
<p class=”description”>Prestigio SmartBook 133S Dark Grey, 13.3" FHD IPS, Celeron N3350 1.1GHz, 4GB, 32GB, Windows 10 Pro + Office 365 1 gadam</p>,
<p class=”description”>Prestigio SmartBook 133S Gold, 13.3" FHD IPS, Celeron N3350 1.1GHz, 4GB, 32GB, Windows 10 Pro + Office 365 1 gadam</p>,
...
</p>]



Obviously the results are still in HTML format, georgia telegram database so we need to clean them up and get just the element string. We use the text function for this .

Text can be used to sort HTML code lines, but you need to define a new variable, for example:

# Try to call price
price1 = soup.find(‘h4’, class_ = ‘pull-right price’)
price1.text

Result:

Out[55]: ‘$295.99’

The output is only a line of code, but that's not enough. In the next step, we'll learn how to parse all the lines and make a list out of them.
Post Reply