简体   繁体   中英

Web scraping a table in R Fantasy Premier League

I am trying to extract the table from the website: https://fantasy.premierleague.com/statistics?fbclid=IwAR1vShDx0eEefTus-dcxA6anpurcmxz2p4fKHcq1uu9xLj54BYhdpF4pxvc

but it gives 0 elements. Can you please help me?

Thank you in advance.

This is best done using the fantasy premier league API. Go here for more info on the API link: https://www.reddit.com/r/FantasyPL/comments/c64rrx/fpl_api_url_has_been_changed/

Using an API in R will require you to do some research, but have a look at the fromJSON() function in the jsonlite package.

This should be enough to get you started, let me know if you have more questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM