Forum Discussion
mmickle23
1 year agoRegular Visitor
Scrape Fantasy Baseball Site
Hello- I would like to scrape the data from a table on my fantasy baseball site. I think the list is being rendered using javascript. Not 100% sure though. In the past I have seen URLs that wo...
- 1 year ago
You might be able to get what you want with this code...
let url = "https://atl-01.statsplus.net/ohbl/draftajax/", formData = "{""info"":""round"",""lid"":""100"", ""round"":""All""}", formDataJson = Text.ToBinary(Uri.BuildQueryString(Json.Document(formData))), response = Web.Contents(url, [Content=formDataJson, Headers=[#"Content-Type"="application/x-www-form-urlencoded"]]), htmlTable = Html.Table(response, {{"Round", "TD:nth-child(1)"}, {"Pick", "TD:nth-child(2)"}, {"Overall", "TD:nth-child(3)"}, {"Team", "TD:nth-child(4)"}, {"Selection", "TD:nth-child(5)"}, {"Column6", ".active .player-name-modal"}, {"Pick Time", "TD:nth-child(6)"}, {"Column8", "SUP"}}, [RowSelector="TD:nth-child(1)"]) in htmlTableHope this points you in the right direction.
mmickle23
1 year agoRegular Visitor
Hey, Thank you so much for the assistance. I will look into the API. This gets me 99% of the way there already. You're awesome!