-
Notifications
You must be signed in to change notification settings - Fork 445
Expand file tree
/
Copy pathYoutubeViewbot.py
More file actions
62 lines (46 loc) · 1.47 KB
/
YoutubeViewbot.py
File metadata and controls
62 lines (46 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#Selenium Webdriver must be installed for this to work
import time;
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication, QMainWindow
import sys
from selenium import webdriver;
#application
def window():
def runBot():
#time to refresh page (seconds)
Timer = int(timeInput.text())
#youtube link
link = https://youtu.be/zfWOSR-dVQk
#number of views
views = 1000
driver = webdriver.Chrome('webdrivers\chromedriver.exe')
driver.get(link)
for i in range(views):
time.sleep(Timer)
driver.refresh()
#------WINDOW------------
app = QApplication(sys.argv)
win = QMainWindow()
win.setGeometry(200, 200, 300, 150)
win.setWindowTitle("YouTube ViewBot")
linkLabel = QtWidgets.QLabel(win)
linkLabel.setText("Video Link")
linkLabel.move(15, 20)
linkInput = QtWidgets.QLineEdit(win)
linkInput.setGeometry(110, 10, 191, 20)
linkInput.move(100, 25)
timeLabel = QtWidgets.QLabel(win)
timeLabel.setText("WatchTime(seconds)")
timeLabel.move(15, 45)
timeInput = QtWidgets.QLineEdit(win)
timeInput.setGeometry(40, 10, 40, 20)
timeInput.move(140, 55)
runBotBtn = QtWidgets.QPushButton(win)
runBotBtn.setGeometry(60, 270, 180, 40)
runBotBtn.move(65, 80)
runBotBtn.setText("RUN VIEWBOT")
runBotBtn.clicked.connect(runBot)
win.show()
sys.exit(app.exec_())
window()