-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sub2Pewds BoT.py
34 lines (26 loc) · 1.04 KB
/
Sub2Pewds BoT.py
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
from time import sleep
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
# This 3 lines gets the user-data for chrome login , so you can login in selenium webdriver chrome
options = Options()
options.add_argument("user-data-dir=~/.config/google-chrome")
browser = webdriver.Chrome('./chromedriver', chrome_options=options)
# Redirects you to Pewds channel
browser.get('https://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw')
# Now get that subscribe button
sub2pewds = browser.find_element_by_id('subscribe-button')
# Click on it bruh smh
sub2pewds.click()
# Have paitence, not everyone has good internet :)
sleep(1)
# T-series channel here i come...
browser.get('https://www.youtube.com/user/tseries')
# Get the subscribed button, and click on it
unSubfromT = browser.find_element_by_id('subscribe-button')
unSubfromT.click()
# Click on the confirmation button
confirmButton = browser.find_element_by_id('confirm-button')
confirmButton.click()
sleep(5)
browser.close()