Python and Selenium: Using Chrome

preview_player
Показать описание
In this video, we will see how to use the Chrome browser for all of your web scraping needs in Selenium.

The download link for the “chromedriver” program may be found here:

You will require that Python and pip are installed on your machine:

This video is part of a larger series on "Web Scraping and Automation". You can watch the other videos in this series here:

Further videos on Selenium:

As always, the code in this video is hosted on my Github profile, here:

Website:

Note:
If you are obtaining any permissions issues or receiving a "WinError5"-type error, please consult the following StackOverflow link for how to diagnose:
Рекомендации по теме
Комментарии
Автор

THANK YOU SO MUCH MAN!!!
I've been trying for like an hour and nothing seemed to work. This video is straightforward and to-the-point, and selenium finally works!!

sidharthmak
Автор

PERFECT
Just what I was looking for. Thank you man, for the direct and concise information

intellectualhybrid
Автор

Thanks. Selenium finally works for me !

montagproject
Автор

Thank you so much!! Short and right to the point!

PayneDeathz
Автор

Holy Cow! You deserve millions of subscribers!!

I have a dilemma. I use selenium to log-in my steam account through browser.
The problem starts when it log-in my account, the steam will send a code in my gmail saying "Type this code to make sure you are the person trying to log-in in this account bla bla bla bla". This always happen whenever I log-in my account using different devices or different browsers for the first time.
It seems that the chrome driver does not save history because it always sends me a code whenever I run the program.

I think there are two ways to fix this. (But I don't know which one is doable)
1. Tell the chrome driver to save history, so that whenever I log-in, it will know that it is not my first time logging-in using the chrome driver.
2. Tell selenium to use my "normal" chrome browser to run, instead of the chrome driver.

if you have any more solution or alternative, please tell me. TIA

wilbertraymundrayos
Автор

For purposes of creating a bigger project, I put this in a class and instantiated it. Why does chrome disappear after a few seconds? Do I need something to "hold" it open?

mmgaoiv
Автор

Thanks. It works. Need to make sure Chrome version & drivers version are same.

saibiro
Автор

I have installed Python and PIP correctly, all showing up in the CMD, updated and everything. Installed selenium using PIP, fully set and everything, even in the python folder, it's showing up.

Though, after all of that, the python script does not run properly and shows this as the error message. Any help would be appreciated!

Code >

from selenium import webdriver
driver = webdriver.Chrome()




Error Message >

Traceback (most recent call last):
File project/Test Script Selenium.py", line 1, in <module>
from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'

Officialjadenwilliams
Автор

I like the way you explained. Iam trying to learn

codewithkishore
Автор

Thanks that's pretty simple. works for me.

Ravicgsce
Автор

@lucidProgramming Do you think you could do a video how to start the browser with chrome extensions?

tayloroxelgren
Автор

i got a unicode error while running it in my system, which is windows 10
for that you need to double your backslashes and it works fine now
from chromedriver = 'C:\Users\Raja sharm\Desktop/chromedriver' to chromedriver = 'C:\\Users\\Raja sharma\\Desktop/chromedriver'

rajasharma
Автор

ModuleNotFoundError: No module named 'selenium' , but i install complete it not show in pip list

tkinter
Автор

Hey, every time do this, i get the "Not secure data:, " and the notification "Chrome is being controlled by automated software", and it doesn't end up displaying the page. I've tried to disable notifications and --enable-automation, but none of those work. Do you have any suggestions on how i could go about fixing this?

ful
Автор

Pls help!! I am getting following error:
Failed to create chrome process pls help!!!

BNDas-dfbw
Автор

Quick Question: How do i make selenium minimized when using? Thanks!

Charlie-cixn
Автор

Is there any ways to not have the message Chrome is being controlled by an automated software ?
Thanks

emilejomphe
Автор

Hi nice video,
is it possible to open different softwares like iperf3 can you give me some pointers like what can I do to open other softwares.

vinaykrishnamurthy
Автор

At 2.33 when I try to run it, I get an error message saying "Firefox is not callable". I have the latest version of Firefox. Do you know why this is happening? Thanks.

TheNeilsolaris
Автор

What if this is going to be used on a different repository? Meaning, what if coworkers want to use the script for ci/cd. Where do you point chromedriver?

akdacquel