Created
October 12, 2017 01:16
-
-
Save mockmyberet/823d15c135f779909beaf06adba29c0e to your computer and use it in GitHub Desktop.
Excuse Generator
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
function Get-Excuse | |
{ | |
$url = 'http://pages.cs.wisc.edu/~ballard/bofh/bofhserver.pl' | |
$ProgressPreference = 'SilentlyContinue' | |
$page = Invoke-WebRequest -Uri $url -UseBasicParsing | |
$pattern = '<br><font size = "\+2">(.+)' | |
if ($page.Content -match $pattern) | |
{ | |
$matches[1] | |
} | |
} |
Author
mockmyberet
commented
Oct 12, 2017
(( Invoke-WebRequest -Uri http://pages.cs.wisc.edu/~ballard/bofh/excuses ).content -split '\n') | Get-Random -ea Ignore
Is another way
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment