0

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

Eric K.
  • 121
  • 3
  • 17
  • 1
    You'd likely have better luck registering on their API, using your token, and pulling data straight from their exposed endpoints. They have some for League data. – Andrew Ryan Davis Oct 25 '20 at 20:30
  • Andrew -- thanks for your input. I went ahead and registered for their API. Do you know of anybody using javascript to access/pull league data from the Yahoo! Fantasy football API? Wondering if I can use my strong-suit language to make this happen & pull into an AWS SQL Server database. – Eric K. Oct 27 '20 at 01:01

0 Answers0