Closed JAWEEWAJ closed 12 months ago
I haven't played a league with those positions. Can you provide some documentation about them or maybe link a public league that uses them?
I think you mean something like this: https://www.fantasypros.com/2019/05/a-comprehensive-guide-to-idp-leagues-fantasy-football/ and this looks like a public league: https://football.fantasysports.yahoo.com/league/defensewinsgames
Thanks for sharing that. Looks like these players are only available in individual defensive player (IDP) leagues, so I'd have to also scrape one of those.
For IDP leagues, you can search players by these new positions: D, DB, DL, and LB. Although the players in these four searchable positions have many actual positions: CB, S, DE, DT, and LB. So it'll take care to create the allowed mapping of what actual positions can play which fantasy roster positions.
This is available in release v1.2.0 just published to PyPI (https://pypi.org/project/ffbot/1.2.0/). Thanks for reporting this @JAWEEWAJ!
that was harder to update then I thought.... but I'm not seeing any scraping of the other positions
[code] Successfully installed ffbot-1.2.0 $ python3 Python 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] on linux Type "help", "copyright", "credits" or "license" for more information.
import ffbot LEAGUE = [REMOVED] TEAM = [REMOVED] POSITIONS = "QB, WR, WR, RB, RB, TE, W/R/T, K, DEF, DB, DB, DL, DL, LB, LB, BN, BN, BN, BN, BN, BN" week = ffbot.current_week() df = ffbot.scrape(LEAGUE) 2022-11-11 01:13:51.933 | INFO | ffbot.scraper:scrape:53 - Scraping all QB... 2022-11-11 01:13:54.934 | INFO | ffbot.scraper:scrape:53 - Scraping all WR... 2022-11-11 01:14:03.981 | INFO | ffbot.scraper:scrape:53 - Scraping all RB... 2022-11-11 01:14:09.361 | INFO | ffbot.scraper:scrape:53 - Scraping all TE... 2022-11-11 01:14:14.845 | INFO | ffbot.scraper:scrape:53 - Scraping all K... 2022-11-11 01:14:16.669 | INFO | ffbot.scraper:scrape:53 - Scraping all DEF... Scraping weekly forecasts: 100%|████████████| 1161/1161 [03:01<00:00, 6.41it/s]
[/code]
I'm assuming I did this correctly?
I found it ... df = ffbot.scrape(LEAGUE, is_IDP=True)
Why not make it so that looking at the positions variable, if it includes any of the defense positions to set it true?
I take that back... the output doesn't seem to work except for defense folks now and doesn't show drops?
print(df_opt) Add ... VOR 0 ... 1 ... 2 ... 3
... 314.61 4 Dre Greenlaw (LB) ... 3.2 5 De'Vondre Campbell (LB) ... -1.03
Can you post the whole output? Maybe the first few rows there are dropping players that you'll never start the rest of the season, and the last two rows are players that you should add.
Missing Defense Positions -- DB, DL, LB