'https://sec.gov/Archives/edgar/data/320 ... 462974.xml'
Когда я проверяю источник веб-страницы, Я вижу ошибочное назначение rowspan:
Код: Выделить всё
Rule 10b5-1(c) Transaction Indication
Вот код, который я использую для анализа этого файла и выдается ошибка:
Код: Выделить всё
headers = {
"User-Agent": "Alias ([email protected])",
"Accept-Encoding": "gzip, deflate"
"Host": "www.sec.gov"
}
filing_url = 'https://data.sec.gov/Archives/edgar/data/320193/000032019323000048/xslF345X04/wf-form4_168064750462974.xml'
x = requests.get(filing_url, headers=headers)
if x.status_code != 200:
print(f'Error loading xml for file:\n{filing_url}\nReason: {x.reason}')
else:
print(filing_url,'\n')
columns = [
'title',
'trade_date',
'execution_date',
'trade_code',
'trade_code_v',
'shares_traded',
'acq_code',
'price',
'shares_remaining',
'own_type',
'relationship'
]
try:
tbls = pd.read_html(x.content)
except:
pass
'https://data.sec.gov/Archives/edgar/dat ... 345X03/wf- form4_167546711444862.xml'
**Домены data.sec.gov и sec.gov используются для API и веб-доступа соответственно отдельно
Подробнее здесь: https://stackoverflow.com/questions/793 ... iteral-for