Skip to content

Instantly share code, notes, and snippets.

@scootklein
Last active March 11, 2024 21:27
Show Gist options
  • Save scootklein/11fad1dc713d85f17ece1c18b6b5730f to your computer and use it in GitHub Desktop.
Save scootklein/11fad1dc713d85f17ece1c18b6b5730f to your computer and use it in GitHub Desktop.
-- STEP 1 --
$> ./fetch https://google.com https://apple.com https://microsoft.com
$> https://google.com
$> https://apple.com
$> https://microsoft.com
-- STEP 2 --
./fetch https://www.google.com # this should be successful
-- STEP 3 --
$> ./fetch http://google.com
$> ./fetch https://www.google.com/nope
$> ./fetch https://heroku-host.klein.io
-- STEP 4 --
$> ./fetch https://mindbloom-co.github.io/web-engineering-interview/sample-1.html
- Date and time of the crawl
- Number of link elements detected on the page
- Number of image elements detected on the page
- Execution time of the fetching and the parsing (separately, in ms)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment