on the following page below 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 code (it works fine!):
headers = {
"Host": "www.sec.gov",
"User-Agent": "jo boulement jo@gmx.at",
"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 like this: enter image description here
Error 404: Page Not Found Oops! Page Not Found.
What is here going wrong? The json-link: https://data.sec.gov/submissions/CIK0001067983.json is fine, because download by hand from the page works fine. Hope somebody could give me a hint! Thx!