[PYTHON] NEWB ADDMEFAST YT SUBSCRIBE BOT 2018 WORKING [FREE]
2018-07-25, 10:16 AM, (This post was last modified: 2018-07-27, 07:31 AM by Physicist.)
#1
Hey everyone!
(I posted this in freebies as well, so if mod finds this, please place the thread in appropriate category :) )
I coded a bot for addmefast a while ago and shared it on a couple discord groups. I've been using it alot and people have been messaging me about it so I figured I'll just share this here for you guys
This is a SIMPLE 30 minutes coded bot for youtube subscribe ONLY! If you want to develop more bots that does more things on addmefast or anything, please feel free to message me, I'll be more than happy to assist you.
This is coded in Python, I'm just gonna paste my script here
IMPORTANT: MAKE SURE YOUR GECKODRIVER IS ACCURATELY LOCATED, DOWNLOAD THE DRIVER HERE :----> https://github.com/mozilla/geckodriver/releases

Code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep


current_index = 0
yt = ['username1:pass1', 'username2:pass2'] #right now it's 3 accs max for rotation, I'm too lazy to modify the code so I'll do it later
amf_username = '' #your addmefast username
amf_pass = '' #your addmefast password


x = webdriver.Firefox(executable_path='/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver') #change the location to fit your driver

#STEP1: log-in to youtube account
def login_youtube1(yt,current_index):
       yt_username = yt[current_index].split(':')[0] #your youtube username login
       yt_pass = yt[current_index].split(':')[1] #your yt password
       x.get('https://youtube.com/signin')
       sleep(3)
       form = x.find_element_by_name('identifier')
       form.send_keys(yt_username)
       next_button = x.find_element_by_id('identifierNext')
       next_button.click()
       sleep(3)
       password = x.find_element_by_name('password')
       password.send_keys(yt_pass)
       password_next = x.find_element_by_id('passwordNext')
       password_next.click()
       sleep(2)

def login_youtube2(x,yt,current_index):
       yt_username = yt[current_index].split(':')[0] #your youtube username login
       yt_pass = yt[current_index].split(':')[1] #your yt password
       x.get('https://youtube.com/signin')
       sleep(3)
       form = x.find_element_by_name('identifier')
       form.send_keys(yt_username)
       next_button = x.find_element_by_id('identifierNext')
       next_button.click()
       sleep(3)
       password = x.find_element_by_name('password')
       password.send_keys(yt_pass)
       password_next = x.find_element_by_id('passwordNext')
       password_next.click()
       sleep(2)


login_youtube1(yt,current_index)

#STEP2: log-in to addmefast
def login_addmefast():
       x.get('http://addmefast.com/')
       
       email = x.find_element_by_class_name('email')
       email.send_keys(amf_username)

       password = x.find_element_by_class_name('password')
       password.send_keys(amf_pass)

       login = x.find_element_by_name('login_button')
       login.click()

login_addmefast()
#STEP3: start botting
count = 0
while count != -1:
       try:
               url = 'http://addmefast.com/free_points/youtube_subscribe'
               x.get(url)
               sleep(5)
               subscribe1 = x.find_element_by_class_name('single_like_button')
               main_window = x.current_window_handle
               subscribe1.click()
               sleep(5)
           
               all_windows = x.window_handles
               for window in all_windows:
                   if window != main_window:
                       second_window = window
                   else:
                       pass
           
               #2nd window    
               x.switch_to_window(second_window)
               sleep(10)
               subscribe2 = x.find_element_by_id('subscribe-button')
               subscribe2.click()
               if 'Sorry' in x.page_source and 'wrong' in x.page_source:
                       x.close()
                       x.switch_to_window(main_window)
                       sleep(3)
                       x.get('https://youtube.com/logout/')
                       if current_index == 0:
                               current_index = 1
                               x.close()
                               x = webdriver.Firefox(executable_path='/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver')
                               login_youtube2(x,yt,current_index)
                               login_addmefast()
                               sleep(3)
                       elif current_index == 1:
                               current_index = 2
                               x.close()
                               x = webdriver.Firefox(executable_path='/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver')
                               login_youtube2(x,yt,current_index)
                               login_addmefast()
                               sleep(3)
                       elif current_index == 2:
                               current_index = 3
                               x.close()
                               x = webdriver.Firefox(executable_path='/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver')
                               login_youtube2(x,yt,current_index)
                               login_addmefast()
                               sleep(3)
                       elif current_index == 3:
                               current_index = 0
                               x.close()
                               x = webdriver.Firefox(executable_path='/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver')
                               login_youtube2(x,yt,current_index)
                               login_addmefast()
                               sleep(3)
                               
               else:
                       sleep(4)
                       x.close()
                       x.switch_to_window(main_window)
                       sleep(10)
                       count +=1
       except Exception:
               all_windows = x.window_handles
               if len(all_windows) == 1:
                       continue
               elif len(all_windows) > 1:
                       x.switch_to_window(second_window)
                       x.close()
                       x.switch_to_window(main_window)
                       continue
Latest Thanks - View all

locen12(2018-12-07 11:18 AM) Eripsa(2018-10-22 09:35 AM) rifatoffical(2018-09-05 10:21 AM) 
Reply
Share This Thread :

2018-07-25, 10:59 PM,
#2
This is what I was looking for, Thank you so much buddy
Reply
2018-07-26, 12:51 AM, (This post was last modified: 2018-07-26, 12:52 AM by WhiteGirl.)
#3
I'm not trying to be rude or anything, but you are far from being able to offer your programming services. Your script fails to see the point of what programming supposed to do. To me this is not a bot, as someone that codes professionally and as a hobby I have a pet eve whenever I see this shit being offered as a service.
Especially when the "programmer" who coded this hasn't even taken a single programming 101 course.

Based on your script, if I wanted you to have you write a script that can bot 100 yt accounts then you would probably give me 100 EXACT functions to login named login_youtube1 all the way to login_youtube100?

I would strongly suggest you look into the most basic things about Python and programming 101 because I'm afraid you can't even program at all. Look what a break statement is, how to use dictionaries and lists, and how to use iterators. Also, look up DRY cause you really need to learn that before you even try to offer any of your services.

To anyone that is trying to get into botting, please don't do what this guy is doing AT ALL. Try to first learn Python and beginner programming concepts.

CharlieHarper I would love to hear your opinion on this.
Reply
2018-07-26, 06:27 AM, (This post was last modified: 2018-07-26, 06:53 AM by Physicist.)
#4
(2018-07-26, 12:51 AM)WhiteGirl Wrote: I'm not trying to be rude or anything, but you are far from being able to offer your programming services. Your script fails to see the point of what programming supposed to do. To me this is not a bot, as someone that codes professionally and as a hobby I have a pet eve whenever I see this shit being offered as a service.
Especially when the "programmer" who coded this hasn't even taken a single programming 101 course.

Based on your script, if I wanted you to have you write a script that can bot 100 yt accounts then you would probably give me 100 EXACT functions to login named login_youtube1 all the way to login_youtube100?

I would strongly suggest you look into the most basic things about Python and programming 101 because I'm afraid you can't even program at all. Look what a break statement is, how to use dictionaries and lists, and how to use iterators. Also, look up DRY cause you really need to learn that before you even try to offer any of your services.

To anyone that is trying to get into botting, please don't do what this guy is doing AT ALL. Try to first learn Python and beginner programming concepts.

CharlieHarper I would love to hear your opinion on this.

Hey dude, I did mention in my post about this. I said that I coded this within half an hour and just tried to get the thing done. If you don't like the simple free bot script here, don't use it. If I have time, I'll try to modify the script to use as many yt accs as you want. It's fairly simple but I just don't have time/priority, I'll update the post when I do fix that.
Also I'm not offering programming services homie. I'm just sharing the script. I code objects for my marketing purposes and that's it. My coding skills aren't that great at all and I'd love to get some feedbacks and new knowledge, constantly improving my man
Reply
2018-07-26, 07:58 AM,
#5
[quote='WhiteGirl' pid='691996' dateline='1532542883']

Hey there "humiliate-people-who-are-trying-to-help-and-praise-myself-instead" hardcore programmer. How about ask the administrator to delete your account here on CpaElites?
Reply
2018-07-26, 09:28 AM,
#6
(2018-07-26, 12:51 AM)WhiteGirl Wrote: I'm not trying to be rude or anything, but you are far from being able to offer your programming services. Your script fails to see the point of what programming supposed to do. To me this is not a bot, as someone that codes professionally and as a hobby I have a pet eve whenever I see this shit being offered as a service.
Especially when the "programmer" who coded this hasn't even taken a single programming 101 course.

Based on your script, if I wanted you to have you write a script that can bot 100 yt accounts then you would probably give me 100 EXACT functions to login named login_youtube1 all the way to login_youtube100?

I would strongly suggest you look into the most basic things about Python and programming 101 because I'm afraid you can't even program at all. Look what a break statement is, how to use dictionaries and lists, and how to use iterators. Also, look up DRY cause you really need to learn that before you even try to offer any of your services.

To anyone that is trying to get into botting, please don't do what this guy is doing AT ALL. Try to first learn Python and beginner programming concepts.

CharlieHarper I would love to hear your opinion on this.

(2018-07-26, 07:58 AM)iwdnplay1337 Wrote: [quote='WhiteGirl' pid='691996' dateline='1532542883']

Hey there "humiliate-people-who-are-trying-to-help-and-praise-myself-instead" hardcore programmer. How about ask the administrator to delete your account here on CpaElites?

Yeah, that dude needs to chill, thanks for the share @OP. WhiteGirl, if you don't have anything to offer, chill until you do.
Reply
2018-07-26, 09:44 AM, (This post was last modified: 2018-07-26, 09:54 AM by SwiffJustus.)
#7
(2018-07-26, 12:51 AM)WhiteGirl Wrote: @I'm not trying to be rude or anything,

You Failed miserable !! lol


Whether your points are valid or not is brutally overshadowed by what could be perceived as
a mean spirited reply. Not saying this is the case of course as I genuinely don't think you see
it that way and that ,to me, is even more troubling.  

Giving Firm constructive criticism is one thing, coming off as an overzealous jerk is another, Again,
not saying that is the case here. Actually I'm just speaking as one who this reply(My Reply) could easily be referring
to(ME) lol... But I'm working on it Embarrassed

REALLY, I'm not trying to be rude or anything  Grin
Reply
2018-07-26, 04:34 PM,
#8
It's great. thanks so much for sharing. :)
Reply
2018-07-26, 11:11 PM, (This post was last modified: 2018-07-26, 11:56 PM by WhiteGirl.)
#9
I guess nobody has any programming skills  or has read the script and just mindlessly copies this script over without giving it a second thought.

Let me just iterate all the things that need improving.
  • Importing from a class and never using it
    • Line 2 the script imports the "Keys" class but is never used through the script
  • Not using a Constant or Variable when needed
    • On Line 12 , ironically, there is a comment saying that you should "change the location to fit your driver", and you didn't think for a second to use a variable or a constant for the executable_path. I mean you expect the user to change it 5 times on 5 different locations, and more if they expect to have more than 3 accounts. So for 100 accounts you would need to change it up 100 times lol.
  • Useless point of using "pass" and "continue"
    • Line 81 has the use of "pass" which is useless because there should have been a "break" statement after you found the second window. On top of that, using pass is only helpful as a keyholder for functions that have no body yet. You should not use pass on else statements ever.

    • Line 131 has another useless if statement, it serves no purpose. Why do you need to check if all_windows is equals to 1 if you are at the end of the while loop and you aren't executing any commands if true? Plus, you even put a continue statement which serves 0 purpose.

    • Line 136 has another useless continue statement, a continue statement on the last line of a loop has no use. Those 2 things  leads me to believe that you don't really know what a continue statement and how to use it.

  • Not knowing how to use the %(modulus) operator and writing the same function twice.
    • This is like Fizzbuzz type of test, like the most basic programming skill that they will test you ever.
      Line 93 through 120 is repeated code, code that needs to be repeated for each account. This is why I said your code was not programming as you are violating a very obvious DRY concept. Repeating yourself. If I wanted to modify this script and have 100 accounts running I would have to do add (7 lines * 100 accts) more. What is more ridiculous is that I would need to clone 100 more functions named login_youtubeX() , so that's (15 lines * 100 accts) more lines.

      This reminds me like that Simpsons episode where bart write the same line 11 times over on a chalkboard.
      [Image: bart-simpson-generator.php?line=I+need+t...100+times.]
  • Not using Pep-8 standards. Your lines are way too long, way longer than 80 characters.  147 to 157 characters line are unnacceptable when coding in Python, just look at most open source projects that people contribute. Most of them use a linter. Linting your code is a really good practice to get into.

  • Last but not least, can you please use proper line indenting. Either use 2 or 4 spaces or use a constant amount of spaces for indenting. Your code is uneditable because you used 7 spaces indentation on a couple of lines, then other lines you have more 6 spaces per identation. Seriously, identation is like #1 thing people care when programming with Python.







I have taken 35 minutes to clean up your code and show you how to make it better, without any of the super novice mistakes you have done.

Code:
from time import sleep
from collections import namedtuple, deque

from selenium import webdriver

FIREFOX_EXECUTABLE = '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/geckodriver'
accts = ["username1:password", "username2:password2"]
get_username = lambda acct : acct.split(':')[0]
get_password = lambda acct : acct.split(':')[1]

YoutubeAccount = namedtuple('YoutubeAccount', ['username', 'password','logged_in'])
subscription_counter = Counter()

yt_accts = deque([
   YoutubeAccount(get_username(acct), get_password(acct), False)
   for acct in accts]
)


def login_youtube(driver, account):
   driver.get('https://youtube.com/signin')
   sleep(3)
   driver.find_element_by_name('identifier').send_keys(account.username)
   driver.find_element_by_id('identifierNext').click()
   sleep(3)
   driver.find_element_by_name('password').send_keys(account.password)
   driver.find_element_by_id('passwordNext').click()
   sleep(2)

def login_addmefast(driver):
   driver.get('http://addmefast.com/')
   driver.find_element_by_class_name('email').send_keys(AMF_USERNAME)
   driver.find_element_by_class_name('password').send_keys(AMF_PASSWORD)
   driver.find_element_by_name('login_button').click()


def find_second_window(driver, first_window):
   for window in driver.window_handles
   if window != first_window:
       return window

def addmefast_subscribe(driver):
   url = 'http://addmefast.com/free_points/youtube_subscribe'
   driver.get(url)
   sleep(5)
   main_window = driver.current_window_handle
   driver.find_element_by_class_name('single_like_button').click()
   second_window = find_second_window(driver, main_window)
   sleep(5)
   driver.switch_to_window(second_window)
   sleep(10)
   driver.find_element_by_id('subscribe-button').click()

   return main_window, second_window

def error_on_subscription(driver):
   if 'Sorry' in driver.page_source and 'wrong' in driver.page_source:
       driver.close()
       driver.switch_to_window(main_window)
       sleep(3)
       driver.get('https://youtube.com/logout/')
       driver.close()
       return True

   return False

def close_second_window(driver, main_window, second_window):
   if len(driver.window_handles) > 1:
       driver.switch_to_window(second_window)
       driver.close()
       driver.switch_to_window(main_window)


def get_youtube_account():

   try:
       return yt_accts.popleft()
   except IndexError:
       return None

yt_acct = None


while True:

   if yt_acct:
       yt_acct = get_youtube_account()

   if not yt_acct:
       break;

   try:
       if not yt_acct.logged_in:
           login_youtube(driver, yt_acct)
           yt_acct.logged_in = True

       main_window, second_window = addmefast_subscribe(driver)

       if error_on_subscription(driver):
           driver = webdriver.Firefox(executable_path=FIREFOX_EXECUTABLE)
           yt_acct = None

       else:
           subscription_counter[yt_acct.username] += 1

   except Exception:
       if len(driver.window_handles) > 1:
           driver.switch_to_window(second_window)
           driver.close()
           driver.switch_to_window(main_window)

(2018-07-26, 06:27 AM)Physicist Wrote:
(2018-07-26, 12:51 AM)WhiteGirl Wrote: I'm not trying to be rude or anything, but you are far from being able to offer your programming services. Your script fails to see the point of what programming supposed to do. To me this is not a bot, as someone that codes professionally and as a hobby I have a pet eve whenever I see this shit being offered as a service.
Especially when the "programmer" who coded this hasn't even taken a single programming 101 course.

Based on your script, if I wanted you to have you write a script that can bot 100 yt accounts then you would probably give me 100 EXACT functions to login named login_youtube1 all the way to login_youtube100?

I would strongly suggest you look into the most basic things about Python and programming 101 because I'm afraid you can't even program at all. Look what a break statement is, how to use dictionaries and lists, and how to use iterators. Also, look up DRY cause you really need to learn that before you even try to offer any of your services.

To anyone that is trying to get into botting, please don't do what this guy is doing AT ALL. Try to first learn Python and beginner programming concepts.

CharlieHarper I would love to hear your opinion on this.

Hey dude, I did mention in my post about this. I said that I coded this within half an hour and just tried to get the thing done. If you don't like the simple free bot script here, don't use it. If I have time, I'll try to modify the script to use as many yt accs as you want. It's fairly simple but I just don't have time/priority, I'll update the post when I do fix that.
Also I'm not offering programming services homie. I'm just sharing the script. I code objects for my marketing purposes and that's it. My coding skills aren't that great at all and I'd love to get some feedbacks and new knowledge, constantly improving my man

I have no personal vendetta against your at all. However, your OP had a few lines in there that activated my spidey senses. First you opened 2 threads about this script, then you go around posting this script all over discord. This is a marketing forum, so as you know time is money.

When you post on your first thread "If you want me to develop more bots that does more things on addmefast or anything, please feel free to message me and we can work together :) " then to me it obviously looks like as an obvious attempt to sell your services or bots. You can phrase it with a "work can work together" but clearly this script was aimed to get something else.

Plus, given the fact that most users here aren't technically literate when it comes to programming, most users won't even look at the code and see what's wrong nevertheless change anything. I mean, the last guy on your other thread even asked you how to use it.

Everyone will look at my post like some pretentious dude with his head up his ass thinking he is above everyone. However, when you see code that looks like your code and you are spamming on discord and opened 2 threads on CPAElites, then
things smell fishy.I'm sure most users would do the same if they saw someone spamming "Make $100 a day" with some random no name GPT site.

You said you took 30 mins to code this thing, and you don't have time to fix it but you are willing to help individual people with their "coding needs" and take the time to spam it as well.

Someone has to break it to you, but this is what gives programmers that are trying to actually learn to make bots and programming in general a bad name. You care more about coding "objects for marketing" whatever that means, than actually learn about the most basic programming stuff.

To me this is a prime example of the blind leading the blind, everyone else who commented here didn't give you a reply based on what the script is or does. I broke down a list of the most obvious things that stick out, and even rewrote it for you.

Your OP is very obvious that you would charge people if they wanted you to fix or change a couple of things on your script. You even stated yourself that you don't have time yourself because of your marketing thing coding objects.
Reply
2018-07-27, 01:13 AM,
#10
WOW !
Yes you are definitely a coder lol

Again, I don't think anyone is questioning the validity of what you're saying and appreciate the fact
that you're taking the time to bring a bit of clarity to the whole situation..we really do. At least I do Grin .
I guess it just seems as if if it could have just as easily been pointed out without berating a fellow member here,
and yes that is how it appeared, maybe not intentionally so, Maybe so.
This has NOTHING..ZERO..NADA to do with coding..nothing whatsoever..
This is about CHARACTER..  mutual consideration and respect for your fellow member. PERIOD..
I WOULDN'T CARE IF YOU COULD SPLIT AN ATOM WHILE JUGGLING QUANTUM PHYSICS
That doesn't give you the right to belittle another person, no matter how much it is covertly passed off as
constructive criticism. so though we appreciate your detailed elaborate presentation you might wanna take
off your coders hat just for a second and just be a fellow human being so that you might get the point
of why those replies were posted.... Cause brother, it flew right by you lol...
Listen Sir/mam, I'm not trying to give you a hard time but it is quite apparent that your dedicated strive for
excellence in one area may have ,Juuuust a tad, well, you know...

I'll just leave you with this..

[Image: humility_1.jpg]



Oh, and P.S.

@ I guess nobody has any programming skills  or has read the script and just mindlessly copies
this script over without giving it a second thought.


Really...REALLY lol...
And you wonder why you get the business lol

Brother Just as there are consequences for sloppy, incorrect or bad coding, so are we to be held accountable for our
ILL-ADVISED ACTIONS & RECKLESS WORDS Wink  

Have a Good day my Friend  Smile


Sorry OP, I'll come back and clear this off of your thread in a minute !
Reply


Related Threads
Thread Author Replies Views Last Post
  What bot you use for instagram? Luksa998 11 771 Yesterday, 01:11 PM
Last Post: CharlieHarper
  Instagram bot set-up advice. Chalapo 3 744 2018-12-07, 02:52 PM
Last Post: SandraH89
  [ALL NEW] AddMeFast Bot Suite V4.2.2 [Portable][Custom][Dedicated Browser][Reliable] OMGWTFISTHIS 836 178,269 2018-12-07, 11:26 AM
Last Post: locen12
  [GET] Working YouTube Views Method Script ! YalaYolo 143 40,065 2018-12-01, 01:30 PM
Last Post: CharlieHarper
  Need a YT expert martek 3 515 2018-10-05, 06:26 AM
Last Post: moonpk





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top