Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
- Fixed overrides being ignored
Browse files Browse the repository at this point in the history
- Added new overrides for lpl, lck, lec, lcs
- Wait on a new tab lowered 60 -> 30
  • Loading branch information
kuba committed Jun 29, 2022
1 parent 891240d commit fbe02ea
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

# Force Twitch player
OVERRIDDES = {
"https://lolesports.com/live/lck_challengers_league": "https://lolesports.com/live/lck_challengers_league/lckcl"
"https://lolesports.com/live/lck_challengers_league":"https://lolesports.com/live/lck_challengers_league/lckcl",
"https://lolesports.com/live/lpl":"https://lolesports.com/live/lpl/lpl",
"https://lolesports.com/live/lck":"https://lolesports.com/live/lck/lck",
"https://lolesports.com/live/lec":"https://lolesports.com/live/lec/lec",
"https://lolesports.com/live/lcs":"https://lolesports.com/live/lcs/lcs"
}

def getLiveMatches(driver):
Expand Down Expand Up @@ -61,10 +65,11 @@ def getLiveMatches(driver):
currentWindows[match] = driver.current_window_handle
if match in OVERRIDDES:
url = OVERRIDDES[match]
log.info(f"Overriding {match} to {url}")
else:
url = match
driver.get(match)
time.sleep(60)
driver.get(url)
time.sleep(30)

driver.switch_to.window(originalWindow)
time.sleep(900)
Expand Down

0 comments on commit fbe02ea

Please sign in to comment.