futbin_scrap: futbin_scrap extracts all players of a Futbin URL.

Description Usage Arguments Value Examples

View source: R/futbin_scrap.R

Description

futbin_scrap extracts all players of a Futbin URL.

Usage

1
futbin_scrap(url, platform = "ps4", sleep_time = 5, verbose = TRUE)

Arguments

url

Futbin URL to web scrap. Futbin webpage (https://www.futbin.com/players) can be used to make customised filters, and then copy the URL here. All the players found in the URL (and the next pages) will be automatically detected and downloaded.

platform

Platform to get the prices from. Default is 'ps4'. Other options are 'xone' (XBox One) and 'pc'.

sleep_time

Time (in seconds) ellapsed between scraping one page and the next one. Please respect Futbin API.

verbose

Optional. To show additional verbose about webpage used and number of players found.

Value

A dataframe with all the players found at the URL.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Aston Villa players -> To get the URL, go to futbin.com/players and filter
futbin_scrap(url = "https://www.futbin.com/players?page=1&club=2")

# Spanish centre-backs from La Liga -> To get the URL, go to futbin.com/players and filter
futbin_scrap(url = "https://www.futbin.com/players?page=1&nation=45&league=53&position=CB")

## End(Not run)

danielredondo/rfutbin documentation built on Dec. 19, 2021, 8:07 p.m.