-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
When I get to quarterly result, I can only manage to get current 5 quarters. How can I manage to get CSV with current 5 quarter, hit "Previous Years >>" get the 5 quarters from here and then hit it again to get another set of 5 quarter. It can be in one CSV or more than one. Please guide me
Ex
https://www.moneycontrol.com/financials/itc/results/quarterly-results/ITC#ITC
- Get thispage
- Click "Previous Years >>" get the 5 quarters from here
- Again Click "Previous Years >>" get the 5 quarters from here
in total 15 quarter results
I tried to define another get_data function but doesn't work
def get_QR_Data_parser(aurl,fname):
soup = get_soup(aurl)
og_table = soup.find('div',{'class':'boxBg1'})
links = og_table.find('div',{'class':'FR PB20'})
for link in links.find_all('b'):
format_type = link.get_text()
new_fname = fname + format_type + ".csv"
if link.find('a',{'class':'active'}):
table = og_table
else:
web_address = baseurl + link.find('a')['href']
new_soup = get_soup(web_address)
table = new_soup.find('div',{'class':'boxBg1'})
get_values(table,new_fname)
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels