Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web scraping code block not work #13

Open
Ye1179 opened this issue Nov 17, 2021 · 0 comments
Open

web scraping code block not work #13

Ye1179 opened this issue Nov 17, 2021 · 0 comments

Comments

@Ye1179
Copy link

Ye1179 commented Nov 17, 2021

When I try to download 10-k document in Project5, it seems that the website block such behavior and I can't successfully get the raw_fillings_by_ticker variable.
`raw_fillings_by_ticker = {}

for ticker, data in sec_data.items():
raw_fillings_by_ticker[ticker] = {}
for index_url, file_type, file_date in tqdm(data, desc='Downloading {} Fillings'.format(ticker), unit='filling'):
if (file_type == '10-K'):
file_url = index_url.replace('-index.htm', '.txt').replace('.txtl', '.txt')

        raw_fillings_by_ticker[ticker][file_date] = sec_api.get(file_url)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant