ffbot 1.2.8__tar.gz → 1.2.9__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.8
3
+ Version: 1.2.9
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.9"
@@ -190,13 +190,13 @@ def current_week():
190
190
 
191
191
  # Parse current week from a public league
192
192
  s = create_session()
193
- url = "https://football.fantasysports.yahoo.com/f1/{}".format(PUBLIC_LEAGUE)
193
+ url = "https://football.fantasysports.yahoo.com/f1/{}/1".format(PUBLIC_LEAGUE)
194
194
  s.headers["User-Agent"] = generate_user_agent()
195
195
  r = s.get(url)
196
196
  soup = bs(r.text, "lxml")
197
- matchups = soup.select_one("#matchupweek .matchups-body")
198
- weeks = re.findall(r"Week (\d+)", matchups.text)
199
- week = weeks[0]
197
+ REGEX_PATTERN = r"Week (\d+)"
198
+ m = re.search(REGEX_PATTERN, soup.text)
199
+ week = m.group(1)
200
200
  week = int(week)
201
201
 
202
202
  return week
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ffbot
3
- Version: 1.2.8
3
+ Version: 1.2.9
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.8"
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