Skip to content

Commit

Permalink
Fixed viewcount counting wrong when number of drivers is greater than 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
sryu1 committed Dec 5, 2022
1 parent a694e26 commit 2e14c12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ def play_video(drivers):
options.add_argument("--mute-audio")
options.add_experimental_option("excludeSwitches", ["enable-logging"])
drivers.append(webdriver.Chrome(options=options,
executable_path=r"chromedriver"))
executable_path=r"chromedriver"))
drivers[i].get(random.choice(sites))
drivers[i].get(url)
play_video(drivers)

while True:
time.sleep(time_to_refresh)
viewcount += 1
viewcount += number_of_drivers
wsviewcount()

print("view count = " + str(viewcount))
Expand Down
4 changes: 2 additions & 2 deletions GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ def play_video(drivers):
options.add_experimental_option(
"excludeSwitches", ["enable-logging"])
drivers.append(webdriver.Chrome(options=options,
executable_path=r"chromedriver"))
executable_path=r"chromedriver"))
drivers[i].get(random.choice(sites))
drivers[i].get(url)
play_video(drivers)

while True:
time.sleep(time_to_refresh)
viewcount += 1
viewcount += number_of_drivers
wsviewcount()
progress_bar()

Expand Down

0 comments on commit 2e14c12

Please sign in to comment.