Created
August 6, 2020 15:30
-
-
Save rodrigogiraoserrao/23c6da18edb0d66b9624a98f120e5225 to your computer and use it in GitHub Desktop.
RGS's solution for Problem 3, Phase 2 of 2020 APL competition (see https://mathspp.com/blog/2020-apl-competition for my thoughts on it)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PastTasksBlast ← { | |
| ⍝ Function to scrape Dyalog's webpage for the URLs of past year's competition problem statements. | |
| ⍝ Monadic function expecting a character vector. | |
| ⍝ Assumes HttpCommand is loaded. | |
| ⍝ Returns a vector of character vectors. | |
| r ← #.HttpCommand.Get ⍵ | |
| r.HttpStatus≠200: 0⍴⊂,' ' | |
| base ← ⊃('<base +href="(.*?)"' ⎕S '\1') r.Data | |
| ('href="(.*?[.]pdf)"' ⎕S (base,'\1')) r.Data | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment