“The first function, get_debt(), fetches the debt page from
brillig.com and then extracts and cleans up the debt number. The
debt number is extracted from the alt attribute of the image at the
top of the page. The string there contains spaces and commas and a
dollar sign, those are removed to give us a usable number.“The second function fmt_time() formats a time component for our
output. For example, fmt_time 2 second prints “2 seconds”, fmt_time
0 second prints “” (an empty string).“The third function, elapsed_time() takes two time values in
seconds and calculates the difference between the two. It then
formats the elapsed time in a readable fashion. For example
elapsed_time 0 3659 prints “1 hour 59 seconds”.
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts
Articles
View All Hover to load posts