Skip to content

Commit 2e14c12

Browse files
committed
Fixed viewcount counting wrong when number of drivers is greater than 1.
1 parent a694e26 commit 2e14c12

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ def play_video(drivers):
111111
options.add_argument("--mute-audio")
112112
options.add_experimental_option("excludeSwitches", ["enable-logging"])
113113
drivers.append(webdriver.Chrome(options=options,
114-
executable_path=r"chromedriver"))
114+
executable_path=r"chromedriver"))
115115
drivers[i].get(random.choice(sites))
116116
drivers[i].get(url)
117117
play_video(drivers)
118118

119119
while True:
120120
time.sleep(time_to_refresh)
121-
viewcount += 1
121+
viewcount += number_of_drivers
122122
wsviewcount()
123123

124124
print("view count = " + str(viewcount))

GUI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ def play_video(drivers):
7474
options.add_experimental_option(
7575
"excludeSwitches", ["enable-logging"])
7676
drivers.append(webdriver.Chrome(options=options,
77-
executable_path=r"chromedriver"))
77+
executable_path=r"chromedriver"))
7878
drivers[i].get(random.choice(sites))
7979
drivers[i].get(url)
8080
play_video(drivers)
8181

8282
while True:
8383
time.sleep(time_to_refresh)
84-
viewcount += 1
84+
viewcount += number_of_drivers
8585
wsviewcount()
8686
progress_bar()
8787

0 commit comments

Comments
 (0)