1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[LF] Youtube Comment BOT

Discussion in 'Black Hat SEO Tools' started by JinxerCraft, Apr 17, 2017.

  1. JinxerCraft

    JinxerCraft Regular Member

    Joined:
    Mar 18, 2017
    Messages:
    231
    Likes Received:
    33
    Gender:
    Male
    Anyone selling or know about YT Comment BOT?
    I need lifetime licence and UPdate.

    Thanks in advance :)
     
  2. softwaredevz

    softwaredevz BANNED BANNED

    Joined:
    Apr 16, 2017
    Messages:
    56
    Likes Received:
    2
    Gender:
    Male
    able to build this one for you
     
  3. TimelordHarry

    TimelordHarry Regular Member

    Joined:
    Apr 6, 2017
    Messages:
    234
    Likes Received:
    57
    Gender:
    Male
    Occupation:
    Tardis Enginner
    Location:
    Gallifrey
    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())
     
    • Thanks Thanks x 5
  4. Moiisam10

    Moiisam10 BANNED BANNED

    Joined:
    Mar 18, 2014
    Messages:
    132
    Likes Received:
    19
    Gender:
    Male
    Similar to mine, good job (y)
     
    • Thanks Thanks x 1
  5. TimelordHarry

    TimelordHarry Regular Member

    Joined:
    Apr 6, 2017
    Messages:
    234
    Likes Received:
    57
    Gender:
    Male
    Occupation:
    Tardis Enginner
    Location:
    Gallifrey
    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.
     
  6. aak83

    aak83 Jr. VIP Jr. VIP

    Joined:
    Nov 30, 2014
    Messages:
    236
    Likes Received:
    51
    Gender:
    Male
    Occupation:
    YouTube SEO
    Location:
    Bangladesh
    Home Page:
    Bot Comments will drop.
     
  7. Moiisam10

    Moiisam10 BANNED BANNED

    Joined:
    Mar 18, 2014
    Messages:
    132
    Likes Received:
    19
    Gender:
    Male
    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 :p
     
    • Thanks Thanks x 1
  8. TimelordHarry

    TimelordHarry Regular Member

    Joined:
    Apr 6, 2017
    Messages:
    234
    Likes Received:
    57
    Gender:
    Male
    Occupation:
    Tardis Enginner
    Location:
    Gallifrey
    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.
     
  9. Moiisam10

    Moiisam10 BANNED BANNED

    Joined:
    Mar 18, 2014
    Messages:
    132
    Likes Received:
    19
    Gender:
    Male
    No problem mate, maybe i publish mine too.
    [​IMG]
     
    • Thanks Thanks x 1
  10. mrtm2003

    mrtm2003 Newbie

    Joined:
    Apr 27, 2017
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    Could you help me run it?
    Can I replace it with my info and run it like a normal python script or do I need anything else?
    What is the Youtube API comment limit for a certain video?I'm planning to use it on giveways..
     
  11. seohug

    seohug Jr. VIP Jr. VIP

    Joined:
    Feb 14, 2011
    Messages:
    343
    Likes Received:
    61
    Gender:
    Male
    Occupation:
    Automator
    Location:
    UK
    Home Page:
    Not sure why you guys are not using YouTube API.
     
    • Thanks Thanks x 1
  12. stewmath

    stewmath Regular Member

    Joined:
    Jan 20, 2008
    Messages:
    201
    Likes Received:
    25
    Gender:
    Male
    Occupation:
    Analyst / Domainer
    Location:
    Lichfield, uk
    Home Page:
    Commenting is the easy part, getting them to not be ghosted is where im having trouble
     
  13. Vikas Gangwar

    Vikas Gangwar BANNED BANNED

    Joined:
    Apr 25, 2017
    Messages:
    31
    Likes Received:
    4
    Gender:
    Male
    Hey bro thanks a ton for sharing the script could you help me how can I use this to run it
     
  14. ChippingCoder

    ChippingCoder Newbie

    Joined:
    Jun 27, 2015
    Messages:
    1
    Likes Received:
    0
    Does anyone know what the comment limits are before being terminated? I've modified the code to handle the new google login, and I've improved the bot extensively, thanks!
     
  15. TaAaZZ28

    TaAaZZ28 Junior Member

    Joined:
    Aug 31, 2014
    Messages:
    162
    Likes Received:
    68
    Gender:
    Male
    Did you decide to post it?
     
  16. TheMightiestFurher

    TheMightiestFurher Newbie

    Joined:
    Jul 3, 2016
    Messages:
    28
    Likes Received:
    3
    Gender:
    Male
    **
    Please can u help me in running it. skype id : skyp.busg.rap . I need ur help.
     
  17. Mind Trick

    Mind Trick Newbie

    Joined:
    Jun 14, 2017
    Messages:
    4
    Likes Received:
    0
    Gender:
    Male
    I know about youtube comment bot with update. If you need yet write PM ;)
     
  18. JinxerCraft

    JinxerCraft Regular Member

    Joined:
    Mar 18, 2017
    Messages:
    231
    Likes Received:
    33
    Gender:
    Male
    Coded Yourself?
    Or,Any Free Version?
     
  19. Mind Trick

    Mind Trick Newbie

    Joined:
    Jun 14, 2017
    Messages:
    4
    Likes Received:
    0
    Gender:
    Male
    No i am not a coder. I can give you free version without updates and —Āhargeable version with updates.
     
  20. TL57

    TL57 Newbie

    Joined:
    Sep 3, 2017
    Messages:
    7
    Likes Received:
    0
    Gender:
    Male
    I also need help running this, thanks