Python function, need to make it so lists can go through the function. SEC EDGAR : '''
for url in indexurls:
    row = parseFormPage(indexurls)
row
'''
indexurls is a list filled with urls 

returns an error instead of going through the list.
Need help with iterations!
heres the function code 
''' 
def parseFormPage(indexurls):
    '''
    Input: URL
    
    Output:
        filer_cik:
        filing_date:
        report_date:
        form_url
    '''
    
    # get page and create soup
    res = requests.get(indexurls)
    html = res.text
    soup = BeautifulSoup(html, 'html.parser')
    
    # parse filer Info on 10K page
    filer_div = soup.find('div', {'id': 'filerDiv'})
    filer_text = filer_div.find('span', {'class': 'companyName'}).find('a').get_text()
    filer_cik = re.search(r"(\d{10})\s(\(.+\))$" ,filer_text)[1]
    
    # parse 10K Page Meta data
    form_content = soup.find('div', {'class': 'formContent'})
    
    filing_date = form_content.find('div', text='Filing Date').findNext('div').get_text()
    report_date = form_content.find('div', text='Period of Report').findNext('div').get_text()
    
    # parse 10-K URL
    table = soup.find('table', {'class': 'tableFile', 'summary': 'Document Format Files'})
    href = table.find('td', text='10-K').find_parent('tr').find('a')['href']
    form_url = "https://www.sec.gov" + href
    
    return filer_cik, filing_date, report_date, form_url
'''

