JinxerCraft
Power Member
- Mar 18, 2017
- 797
- 421
Anyone selling or know about YT Comment BOT?
I need lifetime licence and UPdate.
Thanks in advance
I need lifetime licence and UPdate.
Thanks in advance
# -*- coding: utf-8 -*-
# Python bot for youtube comment
#forked and written by tlh and tdw(original)
import time
import numpy as np
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
def youtube_login(email,password):
# Browser
driver = webdriver.Firefox()
driver.get('https://accounts.google.com/ServiceLogin?hl=en&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue%26next%3D%252F&uilel=3&passive=true&service=youtube#identifier')
# log in
driver.find_element_by_id('Email').send_keys(email)
driver.find_element_by_id('next').click()
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "Passwd")))
driver.find_element_by_id('Passwd').send_keys(password)
driver.find_element_by_id('signIn').click()
return driver
def comment_page(driver,urls,comment):
# Check if there still urls
if len( urls ) == 0:
print 'Youtube Comment Bot: Finished!'
return []
# Pop a URL from the array
url = urls.pop()
# Visite the page
driver.get(url)
driver.implicitly_wait(1)
# Is video avaliable (deleted,private) ?
if not check_exists_by_xpath(driver,'//*[@id="movie_player"]'):
return comment_page(driver, urls, random_comment())
# Scroll, wait for load comment box
driver.execute_script("window.scrollTo(0, 500);")
# Comments are disabled?
if check_exists_by_xpath(driver,'//*[@id="comments-disabled-message"]/div/span'):
return comment_page(driver, urls, random_comment())
# Lets wait for comment box
WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.ID, "comment-section-renderer")))
# Activate box for comments
driver.find_element_by_xpath("//div[@id='comment-section-renderer']/div/div[2]/div").click()
# Send comment and post
driver.implicitly_wait(5)
driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(comment)
driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(Keys.ENTER + Keys.ENTER)
# Is post ready to be clicked?
post = WebDriverWait(driver, 15).until(
EC.element_to_be_clickable((By.XPATH,'//*[@id="comment-simplebox"]/div[3]/button[2]'))
)
post.click()
# Lets wait a bit
r = np.random.randint(2,5)
time.sleep(r)
# Recursive
return comment_page(driver, urls, random_comment())
def random_comment():
messages = [
'Whats up?',
'Nice video!',
'Yoyoyo'
]
r = np.random.randint(0, len(messages))
return messages[r]
def check_exists_by_xpath(driver,xpath):
try:
driver.find_element_by_xpath(xpath)
except NoSuchElementException:
return False
return True
if __name__ == '__main__':
# Credentials
email = 'XXXXXXX'
password = 'XXXXXXX'
# List of Urls
urls = [
'https://www.youtube.com/watch?v=N-tUZXrZcyo',
'https://www.youtube.com/watch?v=07iiV3CMo5I'
]
# You can add in a file and import from there
'''
inp = open ("urls.txt","r")
for line in inp.readlines():
urls.append(line.split())
'''
# Login in youtube
driver = youtube_login(email, password)
# Random comment
comment_page(driver,urls,random_comment())
Similar to mine, good job (y)Wrote one few days ago, have fun. And, ask me if you need help running it.
Code:# -*- coding: utf-8 -*- # Python bot for youtube comment #forked and written by tlh and tdw(original) import time import numpy as np from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException def youtube_login(email,password): # Browser driver = webdriver.Firefox() driver.get('https://accounts.google.com/ServiceLogin?hl=en&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue%26next%3D%252F&uilel=3&passive=true&service=youtube#identifier') # log in driver.find_element_by_id('Email').send_keys(email) driver.find_element_by_id('next').click() WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "Passwd"))) driver.find_element_by_id('Passwd').send_keys(password) driver.find_element_by_id('signIn').click() return driver def comment_page(driver,urls,comment): # Check if there still urls if len( urls ) == 0: print 'Youtube Comment Bot: Finished!' return [] # Pop a URL from the array url = urls.pop() # Visite the page driver.get(url) driver.implicitly_wait(1) # Is video avaliable (deleted,private) ? if not check_exists_by_xpath(driver,'//*[@id="movie_player"]'): return comment_page(driver, urls, random_comment()) # Scroll, wait for load comment box driver.execute_script("window.scrollTo(0, 500);") # Comments are disabled? if check_exists_by_xpath(driver,'//*[@id="comments-disabled-message"]/div/span'): return comment_page(driver, urls, random_comment()) # Lets wait for comment box WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.ID, "comment-section-renderer"))) # Activate box for comments driver.find_element_by_xpath("//div[@id='comment-section-renderer']/div/div[2]/div").click() # Send comment and post driver.implicitly_wait(5) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(comment) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(Keys.ENTER + Keys.ENTER) # Is post ready to be clicked? post = WebDriverWait(driver, 15).until( EC.element_to_be_clickable((By.XPATH,'//*[@id="comment-simplebox"]/div[3]/button[2]')) ) post.click() # Lets wait a bit r = np.random.randint(2,5) time.sleep(r) # Recursive return comment_page(driver, urls, random_comment()) def random_comment(): messages = [ 'Whats up?', 'Nice video!', 'Yoyoyo' ] r = np.random.randint(0, len(messages)) return messages[r] def check_exists_by_xpath(driver,xpath): try: driver.find_element_by_xpath(xpath) except NoSuchElementException: return False return True if __name__ == '__main__': # Credentials email = 'XXXXXXX' password = 'XXXXXXX' # List of Urls urls = [ 'https://www.youtube.com/watch?v=N-tUZXrZcyo', 'https://www.youtube.com/watch?v=07iiV3CMo5I' ] # You can add in a file and import from there ''' inp = open ("urls.txt","r") for line in inp.readlines(): urls.append(line.split()) ''' # Login in youtube driver = youtube_login(email, password) # Random comment comment_page(driver,urls,random_comment())
Did you sell yours? Do you know how to stop youtube stopping requests and removing some comments? And, can you fork this a bit to save URLS of videos too (using pandas maybe)?Similar to mine, good job (y)
Did you sell yours? Do you know how to stop youtube stopping requests and removing some comments? And, can you fork this a bit to save URLS of videos too (using pandas maybe)?
I wrote this for a bloke here on BHW who wanted to buy comment bot like a week ago. I wrote this and gave it for free. Poor chap was scammed by someone who did not deliver.
PS: The original code was written by my good friend tiagro in Php two years ago, I ported this in python to make it work.
lol. I can do that myself with a bit of time, I asked if you could help people on this thread. It's okay though, I am going to correct all the shortcomings and post it on code pen or git.I cannot post that here, but if you are interested just send me a PM. And yeah with a simple way you can check if youtube return am empty requests.
Good, its like a challenge when you want to convert from one language to another, but fun![]()
No problem mate, maybe i publish mine too.lol. I can do that myself with a bit of time, I asked if you could help people on this thread. It's okay though, I am going to correct all the shortcomings and post it on code pen or git.
Could you help me run it?able to build this one for you
Hey bro thanks a ton for sharing the script could you help me how can I use this to run itWrote one few days ago, have fun. And, ask me if you need help running it.
Code:# -*- coding: utf-8 -*- # Python bot for youtube comment #forked and written by tlh and tdw(original) import time import numpy as np from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException def youtube_login(email,password): # Browser driver = webdriver.Firefox() driver.get('https://accounts.google.com/ServiceLogin?hl=en&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue%26next%3D%252F&uilel=3&passive=true&service=youtube#identifier') # log in driver.find_element_by_id('Email').send_keys(email) driver.find_element_by_id('next').click() WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "Passwd"))) driver.find_element_by_id('Passwd').send_keys(password) driver.find_element_by_id('signIn').click() return driver def comment_page(driver,urls,comment): # Check if there still urls if len( urls ) == 0: print 'Youtube Comment Bot: Finished!' return [] # Pop a URL from the array url = urls.pop() # Visite the page driver.get(url) driver.implicitly_wait(1) # Is video avaliable (deleted,private) ? if not check_exists_by_xpath(driver,'//*[@id="movie_player"]'): return comment_page(driver, urls, random_comment()) # Scroll, wait for load comment box driver.execute_script("window.scrollTo(0, 500);") # Comments are disabled? if check_exists_by_xpath(driver,'//*[@id="comments-disabled-message"]/div/span'): return comment_page(driver, urls, random_comment()) # Lets wait for comment box WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.ID, "comment-section-renderer"))) # Activate box for comments driver.find_element_by_xpath("//div[@id='comment-section-renderer']/div/div[2]/div").click() # Send comment and post driver.implicitly_wait(5) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(comment) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(Keys.ENTER + Keys.ENTER) # Is post ready to be clicked? post = WebDriverWait(driver, 15).until( EC.element_to_be_clickable((By.XPATH,'//*[@id="comment-simplebox"]/div[3]/button[2]')) ) post.click() # Lets wait a bit r = np.random.randint(2,5) time.sleep(r) # Recursive return comment_page(driver, urls, random_comment()) def random_comment(): messages = [ 'Whats up?', 'Nice video!', 'Yoyoyo' ] r = np.random.randint(0, len(messages)) return messages[r] def check_exists_by_xpath(driver,xpath): try: driver.find_element_by_xpath(xpath) except NoSuchElementException: return False return True if __name__ == '__main__': # Credentials email = 'XXXXXXX' password = 'XXXXXXX' # List of Urls urls = [ 'https://www.youtube.com/watch?v=N-tUZXrZcyo', 'https://www.youtube.com/watch?v=07iiV3CMo5I' ] # You can add in a file and import from there ''' inp = open ("urls.txt","r") for line in inp.readlines(): urls.append(line.split()) ''' # Login in youtube driver = youtube_login(email, password) # Random comment comment_page(driver,urls,random_comment())
No problem mate, maybe i publish mine too.
![]()
Please can u help me in running it. skype id : skyp.busg.rap . I need ur help.Wrote one few days ago, have fun. And, ask me if you need help running it.
Code:# -*- coding: utf-8 -*- # Python bot for youtube comment #forked and written by tlh and tdw(original) import time import numpy as np from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException def youtube_login(email,password): # Browser driver = webdriver.Firefox() driver.get('https://accounts.google.com/ServiceLogin?hl=en&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue%26next%3D%252F&uilel=3&passive=true&service=youtube#identifier') # log in driver.find_element_by_id('Email').send_keys(email) driver.find_element_by_id('next').click() WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "Passwd"))) driver.find_element_by_id('Passwd').send_keys(password) driver.find_element_by_id('signIn').click() return driver def comment_page(driver,urls,comment): # Check if there still urls if len( urls ) == 0: print 'Youtube Comment Bot: Finished!' return [] # Pop a URL from the array url = urls.pop() # Visite the page driver.get(url) driver.implicitly_wait(1) # Is video avaliable (deleted,private) ? if not check_exists_by_xpath(driver,'//*[@id="movie_player"]'): return comment_page(driver, urls, random_comment()) # Scroll, wait for load comment box driver.execute_script("window.scrollTo(0, 500);") # Comments are disabled? if check_exists_by_xpath(driver,'//*[@id="comments-disabled-message"]/div/span'): return comment_page(driver, urls, random_comment()) # Lets wait for comment box WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.ID, "comment-section-renderer"))) # Activate box for comments driver.find_element_by_xpath("//div[@id='comment-section-renderer']/div/div[2]/div").click() # Send comment and post driver.implicitly_wait(5) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(comment) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(Keys.ENTER + Keys.ENTER) # Is post ready to be clicked? post = WebDriverWait(driver, 15).until( EC.element_to_be_clickable((By.XPATH,'//*[@id="comment-simplebox"]/div[3]/button[2]')) ) post.click() # Lets wait a bit r = np.random.randint(2,5) time.sleep(r) # Recursive return comment_page(driver, urls, random_comment()) def random_comment(): messages = [ 'Whats up?', 'Nice video!', 'Yoyoyo' ] r = np.random.randint(0, len(messages)) return messages[r] def check_exists_by_xpath(driver,xpath): try: driver.find_element_by_xpath(xpath) except NoSuchElementException: return False return True if __name__ == '__main__': # Credentials email = 'XXXXXXX' password = 'XXXXXXX' # List of Urls urls = [ 'https://www.youtube.com/watch?v=N-tUZXrZcyo', 'https://www.youtube.com/watch?v=07iiV3CMo5I' ] # You can add in a file and import from there ''' inp = open ("urls.txt","r") for line in inp.readlines(): urls.append(line.split()) ''' # Login in youtube driver = youtube_login(email, password) # Random comment comment_page(driver,urls,random_comment())
I know about youtube comment bot with update. If you need yet write PMAnyone selling or know about YT Comment BOT?
I need lifetime licence and UPdate.
Thanks in advance![]()
Coded Yourself?I know about youtube comment bot with update. If you need yet write PM![]()
No i am not a coder. I can give you free version without updates and сhargeable version with updates.Coded Yourself?
Or,Any Free Version?
Wrote one few days ago, have fun. And, ask me if you need help running it.
Code:# -*- coding: utf-8 -*- # Python bot for youtube comment #forked and written by tlh and tdw(original) import time import numpy as np from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException def youtube_login(email,password): # Browser driver = webdriver.Firefox() driver.get('https://accounts.google.com/ServiceLogin?hl=en&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fhl%3Den%26feature%3Dsign_in_button%26app%3Ddesktop%26action_handle_signin%3Dtrue%26next%3D%252F&uilel=3&passive=true&service=youtube#identifier') # log in driver.find_element_by_id('Email').send_keys(email) driver.find_element_by_id('next').click() WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "Passwd"))) driver.find_element_by_id('Passwd').send_keys(password) driver.find_element_by_id('signIn').click() return driver def comment_page(driver,urls,comment): # Check if there still urls if len( urls ) == 0: print 'Youtube Comment Bot: Finished!' return [] # Pop a URL from the array url = urls.pop() # Visite the page driver.get(url) driver.implicitly_wait(1) # Is video avaliable (deleted,private) ? if not check_exists_by_xpath(driver,'//*[@id="movie_player"]'): return comment_page(driver, urls, random_comment()) # Scroll, wait for load comment box driver.execute_script("window.scrollTo(0, 500);") # Comments are disabled? if check_exists_by_xpath(driver,'//*[@id="comments-disabled-message"]/div/span'): return comment_page(driver, urls, random_comment()) # Lets wait for comment box WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.ID, "comment-section-renderer"))) # Activate box for comments driver.find_element_by_xpath("//div[@id='comment-section-renderer']/div/div[2]/div").click() # Send comment and post driver.implicitly_wait(5) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(comment) driver.find_element_by_xpath('//*[@id="comment-simplebox"]/div[1]').send_keys(Keys.ENTER + Keys.ENTER) # Is post ready to be clicked? post = WebDriverWait(driver, 15).until( EC.element_to_be_clickable((By.XPATH,'//*[@id="comment-simplebox"]/div[3]/button[2]')) ) post.click() # Lets wait a bit r = np.random.randint(2,5) time.sleep(r) # Recursive return comment_page(driver, urls, random_comment()) def random_comment(): messages = [ 'Whats up?', 'Nice video!', 'Yoyoyo' ] r = np.random.randint(0, len(messages)) return messages[r] def check_exists_by_xpath(driver,xpath): try: driver.find_element_by_xpath(xpath) except NoSuchElementException: return False return True if __name__ == '__main__': # Credentials email = 'XXXXXXX' password = 'XXXXXXX' # List of Urls urls = [ 'https://www.youtube.com/watch?v=N-tUZXrZcyo', 'https://www.youtube.com/watch?v=07iiV3CMo5I' ] # You can add in a file and import from there ''' inp = open ("urls.txt","r") for line in inp.readlines(): urls.append(line.split()) ''' # Login in youtube driver = youtube_login(email, password) # Random comment comment_page(driver,urls,random_comment())