Selenium WebDriver Python Tutorial - Make A Simple Bot

preview_player
Показать описание
In the second video in this Selenium tutorial series we will go over how to locate and interact with elements using Selenium Webdriver via Python. We will also cover how to use the selenium webdriver options to customize how our browser behaves. We will learn this via example, by first logging into reddit and then scraping the post titles off the front page

To find web elements we will use ID, CSS classes, and Xpath. It is typically best to use ID and CSS classes when possible, only resort to using Xpath when other options aren't available. Once we've identified the web element with selenium we will look at some of the available attributes and functions we can use via selenium.

#selenium #webdriver #python
Рекомендации по теме
Комментарии
Автор

For setting up Selenium make sure to checkout the first video in this series:

Some of the element selectors on Reddit in this video may have changed, but the fundamentals are the same so you shouldn't have any issues as long as you use your Dev Tools to find the current selectors for each element

renaissanceengineer
Автор

Thanks so much for the tutorial. There is a lack of tutorials on the internet for web scraping. You really went deep in it. I am looking forward for more of your tutorials.

sheikhawais
Автор

This video was to the point unlike other videos available, please make more videos, this was really helpful, don't let GOLD like this die

laughoutpro
Автор

Like 27👍 Hola🖐 Super bien aqui por tu bonito espacio, excelente video💕💕💕💕🌹🌹🌹🌹👍 Bendiciones contonua adelante✨✨✨✨👍

Автор

II think u can still able use getelementsbyclassname to get the iframe
and Selenium allows the nested loop to find elements

ccuuttww
Автор

Thank you. I wrote something near like your code and it works.

ylyasyylkybayev
Автор

Love it from your vedio I am able to solve my problem thanku so much sir....

theroastingershow
Автор

ok I have a question, how come you dont have the red squiggles under 'from' in your code? I am getting the red squiggles

gizmo
Автор

@14:29 i tried doing the same thing you did but I got an error saying it was not a valid syntax so i just copied the iframe's xpath from inspect element and it worked

maximizedvirus
Автор

I am getting an error for this code ""prefs": Unknown word.cSpell
". Can you help me to solve the issue, please? I followed your code all the way...

options.add_experimental_option('prefs', {
1
})

sheikhawais
Автор

hello could you tell me maybe how to loop for example

comment.click()
comment.send_keys("efefe")
post.click()
please i need help i cant loop this after it comments once the window close i tryied everything please i need your help my friend you are expert

nikosslz