How to Make an Omegle Bot [2022 Updated Method] - CodeWithBeri

Dhiraj
0

How to Make an Omegle Bot


Basically, Omegle is a website that enables you to talk anonymously with strangers. You can configure your Omegle bot to say anything, and the only limit is the imagination of a programmer.

Why Create Your Own Chatbot?

Chatbots are a great way to gain insight into human behavior, but they can also be used as advertising platforms. Bots like Omegle allow you access and conversation with another person while simultaneously giving an offer or promoting your website in some cases!

Let's Create A Bot

Welcome folks today in this post we will be building a bot that can increase your website traffic fast with Selenium. All of the full source code is given below, so stick around for more!

Selenium is an awesome and powerful tool that you can use to automate tasks in your workflow.

pip install selenium

You can also download the chrome driver from here for your browser version.

After installing this library make an app.py file and copy-paste the following code

from selenium import webdriver
from time import sleep
while True:
driver = webdriver.Chrome()#provide the local download location of chrome driver for my case it is in downloads
driver.get('https://www.omegle.com/')
driver.maximize_window()
sleep(2)
loginbtn = driver.find_element_by_xpath("/html/body/div[3]/table/tbody/tr[2]/td[1]/div/div/div[1]/input")
loginbtn.send_keys('youtube')#Type your common interest here
cli=driver.find_element_by_xpath("/html/body/div[3]/table/tbody/tr[2]/td[2]/img")
cli.click()
sleep(2)
lol=driver.find_element_by_xpath("/html/body/div[5]/div/div/div[2]/table/tbody/tr/td[2]/div/textarea")
lol.send_keys('Promote my website!')#Type your text that you want to spam
sleep(2)
zaz=driver.find_element_by_xpath("/html/body/div[5]/div/div/div[2]/table/tbody/tr/td[3]/div/button")
zaz.click()
sleep(3)
driver.close()

To run the python file, type in a command window: "C:\>python app.py"

You also create an Omegle bot using javascript. Let me show you that also.

Open Omegle Site in Your Browser, then go to the chat section and open chrome developer console. To open that Ctrl+Shift+i or you can also open it by Right-click -> Inspect and go to the console tab.

Paste the below script in the console tab

function executeOmegle()

{

  let btn = document.querySelector('.disconnectbtn')

  let messageBox = document.querySelector('.chatmsg')

  let sendBtn = document.querySelector('.sendbtn')

  btn.click()

  messageBox.innerHTML="Hello, how are you? To know about me visit codermen.com."

  sendBtn.click()

}

setInterval(executeOmegle,4000)

Remember, To turn off the Omegle bot, clear and close your console. That's all.

Conclusion

I hope you found the Omegle bot tutorial helpful and easy to understand. Remember, it's not possible to solve captcha using this bot. If you have any suggestions on how we can make this blog post better, please let us know in the comments below! Have a great day!

Tags

Post a Comment

0Comments
Post a Comment (0)