need help with parsing, there is a site with many companies https://www.investing.com/equities/ . If you open any of them, say Alphabet and then open the tabs "financials" and then the balance sheet, https://www.investing.com/equities/google-inc-c-balance-sheet then a table appears, each has such a table the company. How can I parse such tables simply by changing the link to the company? Sample table 
Data must be uploaded to a file (csv)
That's what is at the moment, but I do not understand how to bring the output to the proper form and unload it into a file
from bs4 import BeautifulSoup from urllib.request import Request, urlopen import pandas as pd data = [] site= "https://www.investing.com/equities/ebay-inc-balance-sheet" hdr = {'User-Agent': 'Mozilla/5.0'} req = Request(site,headers=hdr) page = urlopen(req) soup = BeautifulSoup(page, "lxml") table = soup.find("table",{"class": "genTbl reportTbl"}) td_list = [] line = soup.find("table",{"class": "genTbl reportTbl"}).find('tbody').find_all('tr') for row in line: cols = row.find_all('td') cols = [ele.text.strip() for ele in cols] data.append([ele for ele in cols if ele]) print(data) 