This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi So I am trying to scrape this website for some data but wheneverver I print the rows of the table I get, extra space and lines.
I do not know why this is happening?
code:
import requests
from bs4 import BeautifulSoup
data = requests.get("https://tradingeconomics.com/united-kingdom/indicators")
Test = []
soup = BeautifulSoup(data.text, "html.parser")
Econ_Table = soup.find_all("table", class_="table table-hover")
Econ_Table = Econ_Table[1]
for row in Econ_Table.find_all("tr"):
#cell is td
for cell in row.find_all("td"):
print(cell.text)
Could anyone help me with this?
Thanks
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...