This is a rewrite of the (currently closed) "Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only”" challenge.
Write the shortest program or function that will:
- List all URLs contained in the HTML document.
A "URL" for this challenge is
- some string of characters
- contained in the
hrefattribute of an
- that starts with
<a href="someotherpage.html"> doesn't have a URL, but
<a href="http://someotherpage.html"> does.
- You may assume the downloaded HTML is valid.
- You may not assume the input is static: you must download the page each time your code is run.
- (as a consequence of above) You may not hardcode the output URLs: this is not kolmogorov-complexity, this is parsing.
- You may use either
https://www.stroustrup.com/C++.htmlas your source URL.
The first 5 URLs on the page (based on a snapshot of the site on April 3, 2023) are:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md http://webhostinggeeks.com/science/programming-language-be https://coderseye.com/stroustrup-the-c-programming-language http://edutranslator.com/jazyk-programmirovanija-c/ https://pngset.com/uz-cplusplus
There are 91 URLs in this particular snapshot.
f="http, which could produce false positives? \$\endgroup\$