My Journey To Learn Python / Selenium & Create Powerful IM Bots

apex1

Regular Member
Joined
May 29, 2015
Messages
217
Reaction score
182
GOAL: I want to be able to make semi-complex bots using Python and Selenium. After I reach this basic but substantial goal I will set a new goal to earn $x,xxx per month using my bot(s).

DEADLINE: October 15th 2017.

JOURNEY START:

So far all my "programming experience" has been with Ubot and some basic PHP.. my knowledge isn't all that great with either, but I've been able to learn some of the key concepts of programming:

-Loops
-Lists
-Arrays
-Variables
-Functions

etc.

It's time to step my game up to the next level.

I'll be listing all the videos and resources I'm using to learn if anyone wants to follow along. I'll also share all my code for bots I build along the way. Hopefully other people will get inspired to learn as well, and we can help each other along the way!

https://www.python.org/downloads/ - Download Python

https://www.jetbrains.com/pycharm/ - Python IDE

Here's a really good tutorial I watched to get started:


So far I've been playing around, trying to learn the syntax for functions, loops etc.

I'm going to spend about 1-2 hours max on Python each day, this should be enough to let me reach my goal in time.

My next update will contain:
  • A test site which I'll be working some automation on (account creation etc).
  • I'll also share all the code for my project.
 
Good luck! I'd advise you also take a look at existing bots that are available over github.com. That way you can see what kind of features these bots provide and implement them yourself.
 
Good luck buddy, im learning C# in high school for 4 years now, this theard will be interesting.
 
good luck! I've been on the same path some time ago, amazing tools! Keep us posted, maybe you share a github?
 
Hey man, if you need any help with python or selenium shoot me a pm!
 
take it from me! learn nodejs/javascript. You can do the same thing python does. PLUS you can build web apps too
 
Thread watched. Interested in building custom bots; have both uBot, WinAutomation, and ZennoPoster. But not much coding yet..
 
I'm doing a similar project so I'll be sure to check on yours and see how it's going!
 
UPDATE:

Guys. I think today I really caught the programming bug :D I might be addicted.

The things I love about Python and Selenium so far:
  • Simple
  • Easy to read
  • Powerful
I was playing around with account creation at SkyRock (random Web 2.0 property) and everything works lightning fast, it's amazing:

PYTHON CODE:

Code:
#IMPORT
from selenium import webdriver
driver = webdriver.Chrome("C:\\Program Files (X86)\\Google\\chromedriver.exe")
from time import sleep

#NAVIGATE
driver.get("https://skyrock.com/subscribe/")
driver.maximize_window()
sleep(2)

#FILL OUT FIELDS
driver.find_element_by_id("pseudo").send_keys("Username775")
driver.find_element_by_id("password").send_keys("MyPass10x123")
driver.find_element_by_id("email").send_keys("[email protected]")

#DROP DOWN SELECTION
driver.find_element_by_xpath("//select[@id='birthday']/option[@value='15']").click()
driver.find_element_by_xpath("//select[@id='birthmonth']/option[@value='1']").click()
driver.find_element_by_xpath("//select[@id='birthyear']/option[@value='1975']").click()

#CLICK RADIO BUTTON
driver.find_element_by_xpath("//INPUT[@id='sexe-man']").click()

#CLICK SUBMIT BUTTON
driver.find_element_by_name("accept").click()
sleep(10)

#END PROGRAM
driver.close()

If you're new to Python and want to learn about Xpath (it lets you select elements that are hard to hook into) check out this tutorial:


I use this Chrome plugin to generate Xpath: https://chrome.google.com/webstore/detail/relative-xpath-helper/eanaofphbanknlngejejepmfomkjaiic
 
Hey man, if you need any help with python or selenium shoot me a pm!

Thanks for the offer! Very cool of you. I'll tag you in the thread with any questions.

take it from me! learn nodejs/javascript. You can do the same thing python does. PLUS you can build web apps too

I'll stick with Python. I like the syntax. It's very logical and clean (to my mind at least). I've looked at Javascript / Java / C# code and from a beginner perspective it seems much harder to decipher.
 
UPDATE:

Guys. I think today I really caught the programming bug :D I might be addicted.

The things I love about Python and Selenium so far:
  • Simple
  • Easy to read
  • Powerful
I was playing around with account creation at SkyRock (random Web 2.0 property) and everything works lightning fast, it's amazing:

PYTHON CODE:

Code:
#IMPORT
from selenium import webdriver
driver = webdriver.Chrome("C:\\Program Files (X86)\\Google\\chromedriver.exe")
from time import sleep

#NAVIGATE
driver.get("https://skyrock.com/subscribe/")
driver.maximize_window()
sleep(2)

#FILL OUT FIELDS
driver.find_element_by_id("pseudo").send_keys("Username775")
driver.find_element_by_id("password").send_keys("MyPass10x123")
driver.find_element_by_id("email").send_keys("[email protected]")

#DROP DOWN SELECTION
driver.find_element_by_xpath("//select[@id='birthday']/option[@value='15']").click()
driver.find_element_by_xpath("//select[@id='birthmonth']/option[@value='1']").click()
driver.find_element_by_xpath("//select[@id='birthyear']/option[@value='1975']").click()

#CLICK RADIO BUTTON
driver.find_element_by_xpath("//INPUT[@id='sexe-man']").click()

#CLICK SUBMIT BUTTON
driver.find_element_by_name("accept").click()
sleep(10)

#END PROGRAM
driver.close()

If you're new to Python and want to learn about Xpath (it lets you select elements that are hard to hook into) check out this tutorial:


I use this Chrome plugin to generate Xpath: https://chrome.google.com/webstore/detail/relative-xpath-helper/eanaofphbanknlngejejepmfomkjaiic
I assume you are using py3?

Beautiful! Next up

- Spoofing user agents
- Proxy integration
- Captcha (2captcha or dbc)

Goodluck!

Also I agree with the above user suggesting nodeJS it's a lot more powerful but depending on what you are wanting to achieve Python will most likely do the trick
 
Back
Top