on-internet
← Community

Python script to get data as JSON from SEC EDGAR source results in 404

Stack Overflow ·

on the following page, there is as Data source a JSON link: https://www.sec.gov/edgar/browse/?CIK=1067983&owner=exclude Data source: CIK0001067983.json -> https://data.sec.gov/submissions/CIK0001067983.json This is my Python code (it works): headers = { "Host": "www.sec.gov", "User-Agent": "jo boulement [email protected]", "Accept-Encoding": "gzip, deflate" } sec_url = "https://data.sec.gov/submissions/CIK0001067983.json" resp = requests.get(sec_url, headers=headers) with open("e:\\sec_api_of_1448574_7.html", "w", encoding="utf-8") as my_file: my_file.write(resp.text) but as result I get a file looks

Comments

Sign in or sign up to comment and upvote.

No comments yet.