Skip to content

Instantly share code, notes, and snippets.

@dharmatech
Created July 23, 2023 02:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
$result = Invoke-RestMethod "https://data.sec.gov/submissions/CIK0000857156.json" -Headers @{ 'User-Agent' = 'dharmatech wayo.cavazos@gmail.com' }
# $result.cik
$paths = for ($i = 0; $i -lt $result.filings.recent.accessionNumber.Count; $i++)
{
$a = $result.filings.recent.accessionNumber[$i] -replace '-', ''
$b = $result.filings.recent.primaryDocument[$i]
"https://www.sec.gov/Archives/edgar/data/$($result.cik)/$a/$b"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment