Комментарии:
For those who watch this video years after it posted. I think a few things are changed:
1) you do not need to download the web driver anymore. Just use
driver = webdriver.Chrome()
2) if you open a page and it closes immediately, add the following (assuming you are using Chrome as well):
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option("detach", True)
driver = webdriver.Chrome(options= options)
These are two main issues I had when I was coding along. Took me sometime to figure out a solution. Hope it helps.
Noupeis, vs code supremacy
ОтветитьIs this still valid with Chrome version 119.0.6045.199? I checked the status and it was x? ..
Ответитьlove this. great chanel. subscribed
ОтветитьI am sorry but this course is very old and very painfull to follow
ОтветитьSeems like I am too late to the party. Chrome version has advanced far ahead (119.xxxxxxxx) and the mentioned chrome driver webpage does not exist any longer. Perhaps that leads to a call to look for a more recent tutorial on Selenium.
Ответитьyou can even have multiple selenium sessions with a virtual moon browser in you kubernetes cluster. i just wrote a script that gets cryptodata from dynamic webpages as a csv. then i asked my self how i could implement it directly in my cluster and even thats possible its so frkn crazy. but you can only have up to 4 parallel sessions in free mode though. i wonder how y<ou could use it to scrape data via a some sort of web aware llm to get nice tables from random webpages.
Ответитьwow this is very concise and clear. you have great communication skills :D
Ответитьthis has some potential but no matter what I tried it doesn't work , tried it on the mac .windows same issue 'str' has no capabilities and nowhere to go from there
ОтветитьMy chrome version is Version 120.0.6099.130 (Official Build) (64-bit) and I cant find a webdriver for chrome
Ответитьwtf is that
Ответитьmsg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'capabilities'
How can I solve a problem of window immediately closing after starting "run" (I am using chrome and VScode)
ОтветитьOnce my browser opens it immediately closes, how can I do it the way you show in the video? I have used the same code and the same parameters, but my browser can stay on the screen if I use a delay function.
Ответитьright after i finished the course, i wrote a programm that will spam join a kahoot game that crashes game whenever teacher gives out the code, and i'll let my programm pick some inappropreate name, anyway love your courses
ОтветитьThis is now outdated and cannot be used
ОтветитьA webpage I am trying to load has around 270 tr tags, but it's only returning 102.What could be the problem?
Ответитьhow do i can fix this problem? :
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
AttributeError: 'str' object has no attribute 'capabilities'
Will it work with safari?
ОтветитьI enjoyed the video so much, but there is an update for newer versions of chrome.
You shoould do this :
from selenium import webdriver
PATH = "C:\\Program Files\\chromedriver-win64\\chromedriver.exe"
cService = webdriver.ChromeService(executable_path=PATH)
driver = webdriver.Chrome(service = cService)
Instead of passing the executable_path to Chrome() directly.
Great intro, about to jump to your 2nd video but here are some updated instructions since the PATH part doesn't work as shown:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("theURL")
driver.quit()
Тим крутой
ОтветитьI couldn’t even get this shit to take 1,000 screenshots 🥲
ОтветитьMay 2024: Following the instructions and using
"
from selenium import webdriver
service = webdriver.ChromeService(executable_path = 'C:\Program Files (x86)\chromedriver.exe')
driver = webdriver.Chrome(service=service)
"
worked for me, otherwise an error appears: " 'str' object has no attribute 'capabilities' "
Link to chrome web-driver is no longer working
ОтветитьThanks for explaining pip. I think people doing tutorials or guides for whichever language or framework are kind of allergic to explaining package managers and assume that everyone knows what they are talking about.
ОтветитьAlright so it appears that the code in this tutorial does not work.
this is what I put in the application called "sublime text" which just lets you write the code and execute it (ctrl+) for execution (ctrl+pause/break button) to end and close the code
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("put your chosen website here")
input()
I found this on the Selenium website you can replace the website with whatever website you are going for. This video is not very good at explaining most things i.e. how to execute or end code or much to begin with especially since the link does not work to begin with.
'str' object has no attribute 'capabilities is a common error I came across
This is a confusing tutorial for a beginner.. First, I don't know what the command window is that you're using where you typed 'import selenium'. Because of this, I don't know what to do once i've completed the installation of Selenium (which shows when i type 'pip list' in cmd). I'm now totally lost.. help :/
ОтветитьTks ! Voici un post à venir qui pourraient intéresser plusieurs abonnés et autres, c'est le fait de pouvoir trouver comment cliquer sur les choix de demandes de consentements comme sur le site Mappy, qui contient une masse d'infos de Pros et surtout leur email..., mais il y a des fenêtres qui sont bloquantes et difficiles à contourner ("Accepter & Fermer" + "Continuer sans accepter" + "Connexion" ...), merci pour ton écoute? Roby
Ответитьthanks for the videos
ОтветитьWow this feels really outdated now..
ОтветитьNot working.
from selenium import webdriver
PATH = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(PATH)
AttributeError: 'str' object has no attribute 'capabilities'
the version of chrome i installed doesnt have a chrome driver of the same version. i am unable to figure out how to download an older version as well...
Ответитьthe link wont work lol
Ответитьbro i get error "Timeout value connect was <object object at 0x0000023DEB2E46E0>, but it must be an int, float or None.", anyone solve this?
Ответитьif you encounter an error that says something like 'str object has no capabilities' try this
cService = webdriver.ChromeService(executable_path='where you stored the exe')
driver = webdriver.Chrome(service = cService)
i'm not an expert but this fixed it for me
Can anyone link the latest chrome web driver please?
ОтветитьBetter than a Udemy course. What a king you are
ОтветитьIt suddenly closes for me after installing it. Don't understand why. (Mind you I'm coming from the future, so the Python and Selenium and Chrome versions are higher)
ОтветитьSo concise and to the point. Makes it look easy.
ОтветитьScraping is nice, but you get detected by Bot Detectors. How to avoid them?
Ответитьhow do we proceed if the link on the chromedriver isn't working? any workaround please
Ответитьwhat is the selenium ide that you use sir?
ОтветитьI am an old guy, but I enjoy learning with your videos. As the time passes by I see you growing from an intelligent, agile teen to a more seasoned young man. Cheers!
ОтветитьI just started learning Selenium and the first problem I encountered was that selenium will automatically close the window if no action is made. So basically if you run the code in this video the window will stay opened for like 2 seconds then it will be shutdown. However I found a solution, add "while True: pass" in the end of the script. I hope it helps!
Ответить❤
I love it. Unlike other tutorial authors, this one was well-prepared for the presentation.
Did any of you guys in the comments changed your life because of this video ( for four years ago)
ОтветитьHeads up, in 2024, doing: "driver = webdriver.Chrome(PATH)" will throw an error.
It can be fixed by removing PATH, like this: "driver = webdriver.Chrome()"