Skip to content
Advertisement

How to access a table in HTML without any name with Beautifulsoup

I am trying to scrape a table from url. The table seems to have no name. I have scraped the links and its text to csv using below code.

JavaScript

What I need is to scrape the table as it is. currently I am able to get just links. I need other columns too.

I have tried following code but failed. I am able to get to the table but thats not enough

JavaScript

Advertisement

Answer

To save data to CSV, you can use this example:

JavaScript

Saves data.csv (screenshot from LibreOffice):

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement