The Ultimate Guide to Selenium Bots - Automating Twitter

Python Simplified
Python Simplified
35.1 هزار بار بازدید - 2 سال پیش - In this video we will
In this video we will explore the art of bot making for the purpose of understanding how it's being used against us 🤖🤖🤖
We will create a simple retweeting bot that searches for posts that contain a certain keyword like: "cat" or "dog" and then retweets selected posts with a quoted message.
The code and the lesson-flow I will demonstrate does not contain any unethical practices: we use a single account and we automate it for harmless purposes. However the techniques you will learn can be applied on different use cases ☢️☢️ so PLEASE use this information responsibly!!! ☢️☢️

-----------------------------------------------------------------
⭐ THANK YOU TO THE SPONSORS ⭐
-----------------------------------------------------------------
This video is brought to you by Bright Data, an innovative web platform that collects and structured web data so that you don't have to!
⭐⭐⭐ Check them out right now: https://brightdata.grsm.io/pythonsimp...

-----------------------------------------------------------------
🎬 RELATED TUTORIALS OF MINE 🎬
-----------------------------------------------------------------
⭐ Anaconda Beginners Guide (Install  Python):
      Anaconda Beginners Guide for Linux an...
⭐ Simple Web App with Flask (HTML introduction):
      Simple Web App with Flask and Heroku ...
⭐ Advanced Web App with Flask (HTML introduction):
     Flask SQLite Web Application Step by ...
⭐ Python For Loops for Beginners:
     Python For Loops - Programming for Be...

-----------------------------------------------------------------
⏰ TIME STAMPS ⏰
-----------------------------------------------------------------
00:00 - intro
00:52 - what is a bot?
02:25 - dummy account
03:25 - web driver set up
04:37 - Selenium set up
05:25 - Jupyter Notebook set up
06:17 - initialize web driver object
07:38 - fix Session Not Created Exception
09:24 - quick introduction to HTML (1 sentence)
09:47 - find element by tag name
11:04 - Developer Tools and how to use it
12:46 - find elements by XPATH
14:12 - why Jupyter Notebook is the best editor for automation
14:30 - continue log in automation
16:26 - search keyword shortcut
17:46 - retweet automation
19:23 - quote tweet automation
20:44 - find elements that contain certain data
24:24 - pause code execution with time.sleep()
25:22 - combine all notebook cells and review code
28:13 - BrightData
29:30 - retweet multiple tweets at once
30:50 - scroll to the bottom of the page (to fetch a new batch of tweets)
32:03 - randomly select a quote message from a pre-defined list
33:52 - fix Element Click Intercepted Exception
35:36 - run bot with full automation
36:14 - your thoughts on the ethics of bot making
37:07 - thanks for watching! :)

-----------------------------------------------------------------
🤖 COMPLETE CODE ON GITHUB 🤖
-----------------------------------------------------------------
https://github.com/MariyaSha/TwitterBot

-----------------------------------------------------------------
💻 IMPORT COMMANDS 💻
-----------------------------------------------------------------
from selenium import webdriver
from selenium.webdriver.common.by import By

---------------------------------------------------------------------------------
🕸️ WEB DRIVERS FOR DIFFERENT BROWSERS 🕸️
---------------------------------------------------------------------------------
⭐ Chrome:
     https://chromedriver.chromium.org/dow...
⭐ Firefox:
     https://github.com/mozilla/geckodrive...
⭐ Edge:
     https://developer.microsoft.com/en-us...

--------------------------------------
🤝 Connect with me 🤝
--------------------------------------
🔗 Github:
      https://github.com/mariyasha
🔗 Discord:
      Discord: discord
🔗 LinkedIn:
      LinkedIn: mariyasha888
🔗 Twitter:
      Twitter: mariyasha888
🔗 Blog:
      https://www.pythonsimplified.org

--------------------------------------------
💳 Credits 💳
--------------------------------------------
⭐ Beautiful animated graphics by:
      mixkit.co
⭐ Beautiful icons by:
      flaticon.com
⭐ Beautiful images by:
      https://www.freepik.com/
2 سال پیش در تاریخ 1401/09/29 منتشر شده است.
35,180 بـار بازدید شده
... بیشتر