Hi All,
I need a minor support to finish my script. I scrap a table from the internet. it has keys like "web" and then the website link and other information.
example of an entry :
The target line has this html code :
I want "Sub-Industry" in an entry and "Semiconductors" in another entry.
I know I can split this some code with string manipulation but the keys in the table are not known.
can BS4 do it?
any support.
I need a minor support to finish my script. I scrap a table from the internet. it has keys like "web" and then the website link and other information.
example of an entry :
The target line has this html code :
Output:<div class="price-data">Sub-Industry<strong>Semiconductors</strong></div>
I reached the line with my code : tableContent = stockData.find_all(class_='price-data') print(tableContent .get_text())The result was like this:
Output:Sub-IndustrySemiconductors
I got everything in one string which doesn't help much.I want "Sub-Industry" in an entry and "Semiconductors" in another entry.
I know I can split this some code with string manipulation but the keys in the table are not known.
can BS4 do it?
any support.