


Watching a Video using XPath to click on the Thumbnail (_videoID) and returning to the Channel Tab (_home)ĭef watchVideo(self, videoNumber, watchTime): Getting Video ID using XPath to find the 'thumbnail' ID VideoElm = _element_by_xpath('/html/body/ytd-app/div/ytd-page-manager/ytd-browse/div/ytd-c4-tabbed-header-renderer/tp-yt-app-header-layout/div/tp-yt-app-header/div/tp-yt-app-toolbar/div/div/tp-yt-paper-tabs/div/div/tp-yt-paper-tab') Self.browser = webdriver.Chrome(executable_path=PATH)Īccepting YouTube/Google's ToS or this weird questionĪccept = _element_by_xpath('/html/body/c-wiz/div/div/div/div/div/div/form')Ĭlicking on VideoPage using XPath to click Initializing webdriver.Chrome (setting self.browser as Chrome) If you havn't installed webdriver already: pip install webdriver Download ChromeDriverĬreating a random delay randomdel = int(randint(0, 60)) Using Chromedriver and Webdriver to open a YouTube Channel Tab I sometimes used Classes and sometimes used def's to create this Then execute this command: python -m pip -r requirements.txtĪnd wait, then you should be able to execute: python viewbot.py The ViewBot has its own UI and it doesn't need many libraries to install.Īfter that execute in your CMD: cd YouTube-and-TikTok-View-Bot It was originaly made to not be open src but i thought about it again and made it open src This is a ViewBot for YouTube, TikTok or whatever you want.
