ffbot 1.2.5__tar.gz → 1.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ffbot
3
- Version: 1.2.5
3
+ Version: 1.2.7
4
4
  Summary: Automate playing Yahoo Fantasy Football
5
5
  Home-page: https://github.com/amarvin/fantasy-football-bot
6
6
  Author: Alex Marvin
@@ -0,0 +1 @@
1
+ VERSION = "1.2.7"
@@ -1,3 +1,4 @@
1
+ import re
1
2
  from datetime import datetime
2
3
  from io import StringIO
3
4
 
@@ -13,7 +14,7 @@ from user_agent import generate_user_agent
13
14
 
14
15
  # A public league for current week and player IDs
15
16
  PUBLIC_LEAGUE = 101
16
- PUBLIC_LEAGUE_IDP = 408
17
+ PUBLIC_LEAGUE_IDP = 413
17
18
  SEARCH_PLAYER_GROUPS = ["QB", "WR", "RB", "TE", "K", "DEF"]
18
19
  SEARCH_PLAYER_GROUPS_IDP = ["QB", "WR", "RB", "TE", "K", "D", "DB", "DL", "LB"]
19
20
 
@@ -188,8 +189,9 @@ def current_week():
188
189
  s.headers["User-Agent"] = generate_user_agent()
189
190
  r = s.get(url)
190
191
  soup = bs(r.text, "lxml")
191
- span = soup.select_one("li.Navitem.current a.Navtarget")
192
- week = span.text.split()[1]
192
+ matchups = soup.select_one("#matchupweek .matchups-body")
193
+ weeks = re.findall(r"Week (\d+)", matchups.text)
194
+ week = weeks[0]
193
195
  week = int(week)
194
196
 
195
197
  return week
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ffbot
3
- Version: 1.2.5
3
+ Version: 1.2.7
4
4
  Summary: Automate playing Yahoo Fantasy Football
5
5
  Home-page: https://github.com/amarvin/fantasy-football-bot
6
6
  Author: Alex Marvin
@@ -1 +0,0 @@
1
- VERSION = "1.2.5"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes