Any suggestions for how to get the login request to work from PowerShell? I am attempting to log in to my Yahoo! Fantasy Football League page to begin scraping some league data. Can't get much further than the following, though:
$url = "https://football.fantasysports.yahoo.com/f1/1177458/players?&sort=AR&sdir=1&status=ALL&pos=QB&stat1=S_W_1&jsenabled=1"
$login = Invoke-WebRequest -Uri $url -SessionVariable yahoo
$login.Forms[0].Fields.email = "****.********@gmail.com"
$login.Forms[0].Fields.pass = "*********"
$mainPage = Invoke-WebRequest $login.Forms[0].Action
Any help you can provide will be greatly appreciated. Thank you, very much! Eric K