for those who don't know, the newer version of selenium has removed the driver.find_element_by_id and similar functions, the new way of writing the same is- driver.find_element("id" , "") hope that helps
How can we extract a word with a tag of yt- formatted -string And im scraping data by looping through 50 yt channels. Sometimes it stops looping with an error of unable to locate But when im executing them individually all 50 channels are able to scrape well. What might be wrong
use this for browser to not automatically closing: ` options = webdriver.ChromeOptions() options.add_experimental_option("detach", True) options.add_experimental_option('excludeSwitches', ['enable-logging']) driver = webdriver.Chrome(options=options) `
9:15 - r as the prefix to a string indicates a "raw string"; that is, character sequences like will be treated as literals and not as escaped control characters (as they normally are in a string.) It's useful when you expect your string to include backslashes, for instance Windows paths, or certain regex expressions.
Many thanks for this amazing tutorial. Not only was it great intro to OOP, it also provided enough info to build my own app from scratch: Automated my timesheet entries at work. It now takes no more than 2 seconds to open browser, login, navigate to desired page, enter all work and time related values, and to pass the submit process with approval from management :) Feeling good while conscious of how much more there is to do and to learn :D
God finallyyyy FCC uploaded selenium tutorial, not 1000th tutorial on react or HTML 😁 I'm very happy! Thank you lovely FreeCodeCamp ❤️ hope here will be more videos with test automation library's, such as playwright and selenium!
options = webdriver.ChromeOptions() options.add_experimental_option("detach",True) driver = webdriver.Chrome(options=options) Use this code if your chrome crash.
@@shivamgupta-hn2nf self.find_element(By.CSS_SELECTOR,'tag[losser_id="name_of_loser]') Here for tag,you have to find which tag this stuff is located in . Like div or a or li. (if you aren't using classes , use driver instead of self )
After watching the tutorial: This is one of the best tutorial for beginners, after this you will be able to scrap easily and make your own bots and can understand the documentation easily. Thank You Jim and FCC for this amazing course 🙏
I completed this tutorial just today, yeah the links may be dead, different methods in selenium has been changed but the concept i got from here that's just worth it 3:00:34
Was getting 'chromedriver' executable needs to be in PATH despite following along with the recommendations and I figured out the issue for both Mac and Win. First, I added a print statement right after the os.environ path setting piece: print(os.environ['PATH']) I noticed it was missing a ; in Windows (: in Mac). So, I modified driver_path append step to this and it worked: os.environ['PATH'] += os.pathsep + self.driver_path os.pathsep adds your OS specific path separator character.
Great solution! Thanks! I figured out that simply adding a ; in front of the driver path works as well, so my line looks like os.environ['PATH'] += r";C:/selenium_drivers"
Thank you so much for this video. I really find it very helpful and easy to follow along. I was able to build bot that is able to scrape huge data from multiple paged website and dumps the record to json while keeping track of records that has already been scraped incase the bot fails at any point it will be able to continue from where it stoped when you run it again and finally merge all dumped json files together and generate an excel sheet. But I got my basis from this video all thanks to you man. I deeply appreciate.
Anyone else have an issue with the os.environ['PATH']? I had to add a semicolon for it to work: r";C:/SeleniumDrivers". Anyone know why it doesn't add it automatically? Thanks.
hello, the video is very good, very intuitive, however in 2023, many of the examples used are invalidated, mainly due to the attributes of the elements of the sites, such as the booking one, they were changed which made it very difficult to scrape the website and follow the progress video was very difficult because of this.
for some of you concatenating the driver path string showed may not work specifically to windows user , for me I had to prepend ; to driver path to make it work like ";C:\seleniumDriver"
Hi, i got an error specifying the path to the web driver like it's done in the video. Instead, i managed to make it work by adding the path like this: driver = webdriver.Chrome("path_to_webdriver") Is there any problem doing it like that? Thanks in advance and thanks for this course.
It's also not working when I am selecting rating. So, I did it on my own. star_filteration_box = self.find_element_by_css_selector( 'div[data-filters-item="class:class=5"]' ) If you are stuck here, it will help you.
@@muhammadshaharyar1 star_filtration_box = self.driver.find_element_by_xpath( '//*[@id="searchboxInc"]/div[1]/div/div/div[1]/div[5]') I tried this way, it works.
Awesome Content thanks Jim shapedCoding channel we wish to introduce more series in this field of python in web scraping 🥺🌸+ thanks FCC for sharing this awesome content on web scraping with us 👏👏🌸
rather not for the begginers even thought I am following the explanation rather ultra basic, without going into details, just 1 senctence as if you have a mission to squezze in 3 h with everything max. Great idea to work on Booking Thanks anyway
Your tutorial is amazing. One of the best coding video I ever saw on yt. There are some elements which changed in the meantime, but I could manage it by my own. It help me to build ezze a bot on another project. Thank you for that!
Great tutorial Jim and the FCC team👌. I just have an issue with the links provided for the websites to test on. They seem to have been moved or are not working anymore. Please fix them for devs to use for learning.
9:30 I'm getting 'FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver; if I use os.environ['PATH'] However if I use PATH="/Users/surajk/Pictures/Selenium/chromedriver", I'm not getting any error. Any suggestions.
Hey, I had a similar issue. After inspecting the path I found that each path string is seperated by a ; so changing it to += ';C:\\SeleniumDrivers' may work for you. I was running in a venv though, so I had to add it to my venv site-packages. Hope that helps.
Hi lex , Can you make your podcast live in youtube so that we could ask some questions too , obviously you can reupload it again with your editing , By this way the questions you are asking will be more public related
all works, before u start this lesson, set up environment first. watch the beginning of this video : th-cam.com/video/m0LdKZ-prto/w-d-xo.html&ab_channel=JimShapedCoding
The code is exact on my file, yet the try and except block won't work for me. I am certain there is not a typo. But it is not doing the click to close the popup, at 34:40. It still pops up. Any suggestions?
Also had the same problem, then I realized that I typed in: no_button = driver.find_elements_by_class_name('at-cm-no-button') When it's actually supposed to be like this: no_button = driver.find_element_by_class_name('at-cm-no-button')
@@MusouFlurry Thank you for your suggestion. But even taking that into account and looking back to see that, there is no typos even there, and mine was like the one you wrote out suggesting it should be. So I'm honestly still stumped. :/
Nice code but the code does change when you have version 104. It is difficult to try to fix the code to match your tutorial. I say this as I am a novice
Great Project! Loved the accent. However, there is one thing i would request for the next selenium tutorial, I am would like to learn more about multiple browser window handling and switching. Thank you for this amazing #CrashCourse
Right now filtration is much more difficult as it was when the tutorial was created. The id="filter-class" pair has been removed and there's no single key-value pair that uniquely identifies the Star Rating box.
I've just started using selenium and I've created a bot that collects from a bitcoin faucet using a vpn and I'm currently running 10 accounts at once although I need to investigate headless and I need to add some asynchronisty to it.
A question to more important fellars here, whatever I did I just couldn't make the driver_path work. Then I checked the os.environ['PATH'] and I saw that when I added the self.driver_path, it didn't add ";" at the end of the line before, compared to the other lines. So I added a ";" at the beginning, like; driver_path=R";C:\SeleniumDrivers" Then it worked. Can someone explain what the devilry is that? I know I didn't do something wrong as I downloaded the document in the github and I got the same result until I added that ";".
Since PATH is just a string without the semicolon the system would not know where the new enviroment variable begins. I'm not sure why the author did not need to do this though? Maybe the text got somehow added in front of the string and then you don't need ; , but then again you would need ; at the end or it would not work either.
Third time is a charm!
Thanks FCC, I am glad to share this with the best coding community. Hope everyone will have a great time learning Selenium! :)
Your work is *COMMENDABLE* I appreciate your *EFFORTS*
Congrats Jim🎉
@JimShapedCoding I already sub your channel from last 8months
sadly wont listen to 3 hour video! :(
You guys are doing history here by democratizing high quality education for free!! 🙏✅
for those who don't know,
the newer version of selenium has removed the driver.find_element_by_id and similar functions, the new way of writing the same is-
driver.find_element("id" , "")
hope that helps
Thank you for the help, I just want to ask you, where did you find this info? I can't find a new documentation for selenium.
Thank you , really appreciate for this information! :3
@@yassinedghoughi9500 python gives warning when you use old version of code.
How can we extract a word with a tag of yt- formatted -string
And im scraping data by looping through 50 yt channels. Sometimes it stops looping with an error of unable to locate
But when im executing them individually all 50 channels are able to scrape well. What might be wrong
its more like beautifulsoup now :D
use this for browser to not automatically closing:
`
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
`
Hey, how can I put it in code from "structure a bot project" (as a part of the booking module)?
Thanks a lot!
thanks you're amazing!
@@workoutinspirations9990 Have you found out the answer??
😅
I am also stuck there
9:15 - r as the prefix to a string indicates a "raw string"; that is, character sequences like
will be treated as literals and not as escaped control characters (as they normally are in a string.) It's useful when you expect your string to include backslashes, for instance Windows paths, or certain regex expressions.
Thanks you
Many thanks for this amazing tutorial.
Not only was it great intro to OOP, it also provided enough info to build my own app from scratch:
Automated my timesheet entries at work. It now takes no more than 2 seconds to open browser, login, navigate to desired page, enter all work and time related values, and to pass the submit process with approval from management :)
Feeling good while conscious of how much more there is to do and to learn :D
God finallyyyy FCC uploaded selenium tutorial, not 1000th tutorial on react or HTML 😁 I'm very happy! Thank you lovely FreeCodeCamp ❤️ hope here will be more videos with test automation library's, such as playwright and selenium!
I am glad I chose this video to learn selenium scraping. I learned a lot from you!. You are really a great teacher. Hats off to you!
This is gold. Please more info about testing automation 🙏🙏🙏
One of the best and most complete tutorials, thank you for this.
Glad to read this :)
options = webdriver.ChromeOptions()
options.add_experimental_option("detach",True)
driver = webdriver.Chrome(options=options)
Use this code if your chrome crash.
куда это писать во второй части, когда мы открываем booking?
😫guys please.. I beg u, really u are making much efforts. Giving all these for free is not a small task.
Almost all the tests links are dead AND the code is outdated. Selenium now uses find_elements() NOT find_by_id() or find_by_class_name() etc.
How does find_elements() work?
@@Vyzinn class = .classname, id = #id etc.
@@reklamsz3m3t a belated but sincere thank you to you :)
Can you please tell me How to find this attribute name losser-id = "name-of-loser" in selinium
@@shivamgupta-hn2nf self.find_element(By.CSS_SELECTOR,'tag[losser_id="name_of_loser]')
Here for tag,you have to find which tag this stuff is located in . Like div or a or li. (if you aren't using classes , use driver instead of self )
This guy learn me Flask and Web Scraping with Bs4 for free. THANKS JIM
PD. Your TH-cam videos of your canal help me to my carrer
the SeleniumEasy links no longer work
Just started using Selenium and this will save me a bunch of time trying to figure out all the methods, thanks!
one of the best teachers ever
thanks for this amazing video
where was this 8 months ago
Greatest channel ever
Thanks!
the first time I watch a excellent tutorial video. thank you very much from Vietnam. wish you all the best
After watching the tutorial: This is one of the best tutorial for beginners, after this you will be able to scrap easily and make your own bots and can understand the documentation easily.
Thank You Jim and FCC for this amazing course 🙏
It's "scrape/scraping". "Scrapping" means something else. :)
I completed this tutorial just today, yeah the links may be dead, different methods in selenium has been changed but the concept i got from here that's just worth it 3:00:34
Hi, the seleniumeasy demo site is no longer working
You guys have been dropping bangers
Was getting 'chromedriver' executable needs to be in PATH despite following along with the recommendations and I figured out the issue for both Mac and Win.
First, I added a print statement right after the os.environ path setting piece:
print(os.environ['PATH'])
I noticed it was missing a ; in Windows (: in Mac). So, I modified driver_path append step to this and it worked:
os.environ['PATH'] += os.pathsep + self.driver_path
os.pathsep adds your OS specific path separator character.
There are other ways to do fix this problem, but this is what I did in a pinch to see what I could do to make it work like the teacher was doing it.
Thank you, it worked for me.
Great solution! Thanks! I figured out that simply adding a ; in front of the driver path works as well, so my line looks like
os.environ['PATH'] += r";C:/selenium_drivers"
@@MiturGrunge what is meaning of semi-colon?
Can you share you your code at this part for an example
Help! the selenium easy links does not work! It said: "Page Not found"
This is the best tutorial I have ever seen. Thank you very much!
how? it's literally outdated. there's no way you learned anything useful with this.
@@checkbouncer wow
greaaaattttttttt, just finished valentin's postman crash course and willing to learn automatization for testing. gj
Thank you so much for this video. I really find it very helpful and easy to follow along. I was able to build bot that is able to scrape huge data from multiple paged website and dumps the record to json while keeping track of records that has already been scraped incase the bot fails at any point it will be able to continue from where it stoped when you run it again and finally merge all dumped json files together and generate an excel sheet. But I got my basis from this video all thanks to you man. I deeply appreciate.
Great content. One of the best explanations in a coding video that I've ever seen.
Anyone else have an issue with the os.environ['PATH']? I had to add a semicolon for it to work: r";C:/SeleniumDrivers". Anyone know why it doesn't add it automatically? Thanks.
Are the seleniumeasy links working? They seem to be removed from the website.
Wow, posted 1 day ago, and fixed my exact problem. No idea why this works.
Thanks for sharing this, i didnt know i should add semicolons there.
THANK YOU FOR THIS!!!!
@@et8175 thanks man..I am searching for this..
Thanks for the great content. Just one thing : Regarding selenium links: the pages aren't found. Anyone could help? thanks!
I loved his beautiful soup tutorial too 👌
hello, the video is very good, very intuitive, however in 2023, many of the examples used are invalidated, mainly due to the attributes of the elements of the sites, such as the booking one, they were changed which made it very difficult to scrape the website and follow the progress video was very difficult because of this.
i am also stuck with that. I am unable to select currency in booking website. If you have solution for this let me know please.
I needed to add ; before the driver path
Great video, to the point and explaining the details for those who are unfalmiliar with Python. !
pls where do people like jim learn that they become so good like this
hey its this guy. Love this guy.
great tutorial! explains everything in a newbie-friendly way...
Great tutorial and great and clear teaching
Videos on this channel are just free gold mines, can’t believe you can get so much knowledge for free.
They are doing really a great job.😘.We all should appreciate them sothat they always get inspired by this. 😘👍.Carry on guys .😊😊
45:44 file making
49:19 import libraries
seleniumeasy test web link no longer works. Is there any other alternative. Tutorial really looks informative so far
Started listening salenium today, and this video tutorial is gem 💎. This guy is really awesome at teaching. #ThanksMuch
This is a great Selenium Tutorial.
Finally...I have been waiting for this course all my life😂😂👍🏾
for some of you concatenating the driver path string showed may not work specifically to windows user , for me I had to prepend ; to driver path to make it work like ";C:\seleniumDriver"
Thank u worked for me too
It doesn't work for me
brilliant... been waiting for selenium tutorial for ages
I was just thinking of studying selenium and this video pops on my notification. What sort of dark magic is this?
Exactly, Same
Same
Hi, i got an error specifying the path to the web driver like it's done in the video. Instead, i managed to make it work by adding the path like this:
driver = webdriver.Chrome("path_to_webdriver")
Is there any problem doing it like that? Thanks in advance and thanks for this course.
This method worked for me as well so thanks for this
This also worked for me on macOS, thanks!
Hi, I'm getting an error both ways. Has anyone else had this problem?
@@justme-ns1rm if you use windows try to use semicolon before the C:..... like ;C:/SeleniumDriver/
@@lucasmate1582 work thx!!!
Nice tutorial man
Jim is always a great teacher ✌🏻✌🏻
Hi all! The seleniumeasy links are not working anymore so can anyone suggest a URL like those for us just starting? Thanks!
It seems the css selector for button is out of date. Maybe I can find it in a div tag under the button tag,?
going through the same issue
Same here, anyone's got any insight as to how to access those specific buttons now?
One of the best tutorials for beginners.
Finally a tutorial I will surely watch.
I have an issue called 'procrastiantion'. I just don't end up watching most of the vids I wanna watch...
You watched?
@@sinbad2597 hell no 😂
Thank you so much guys, you guys are helping us to continue learning during these covid times. THANK YOU
Thank you Mac Miller!
Hi i just started your tutorial and found out that seleniumeasy links that you provided are no longer available. any sudjestion?
same here
yes we are using this for 'testing'
Are the tests from seleniumeasy down?
I've tried to enter to code along with the tutorial, with no success.
Are there any alternative links? Thanks
It's also not working when I am selecting rating. So, I did it on my own.
star_filteration_box = self.find_element_by_css_selector(
'div[data-filters-item="class:class=5"]'
)
If you are stuck here, it will help you.
@@muhammadshaharyar1 star_filtration_box = self.driver.find_element_by_xpath(
'//*[@id="searchboxInc"]/div[1]/div/div/div[1]/div[5]')
I tried this way, it works.
u may also find the Section 3 via the URL above as well. (since I'm not further to Section 3 yet)
Awesome Content thanks Jim shapedCoding channel we wish to introduce more series in this field of python in web scraping 🥺🌸+ thanks FCC for sharing this awesome content on web scraping with us 👏👏🌸
Great tutorial. I find a lot of interesting features in this video, which I am going to use in my automation project. Thanks.
Another amazing tutorial. Thanks Jim
rather not for the begginers even thought I am following
the explanation rather ultra basic, without going into details, just 1 senctence as if you have a mission to squezze in 3 h with everything max.
Great idea to work on Booking
Thanks anyway
Thanks to your coaching, now I feel more confident in my coding skill a bit, haha, thank you, Jim!
Your tutorial is amazing. One of the best coding video I ever saw on yt. There are some elements which changed in the meantime, but I could manage it by my own. It help me to build ezze a bot on another project. Thank you for that!
What?
I am not able to send_keys, can u help?
I will allow myself to like this video.
Great tutorial Jim and the FCC team👌. I just have an issue with the links provided for the websites to test on. They seem to have been moved or are not working anymore. Please fix them for devs to use for learning.
+1
+1
9:30 I'm getting 'FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver; if I use os.environ['PATH']
However if I use PATH="/Users/surajk/Pictures/Selenium/chromedriver", I'm not getting any error.
Any suggestions.
Hey, I had a similar issue. After inspecting the path I found that each path string is seperated by a ; so changing it to += ';C:\\SeleniumDrivers' may work for you. I was running in a venv though, so I had to add it to my venv site-packages. Hope that helps.
@@sootybuu2963 Had the same issue, now it works! Thank you
none of the links actually work , it says the page can’t be found .
can you please try to fix that ?
Hi lex , Can you make your podcast live in youtube so that we could ask some questions too , obviously you can reupload it again with your editing , By this way the questions you are asking will be more public related
link is not working - selenium easy
for some reason most of the content covered doesn't work properly in my computer, is it happening to others?
all works, before u start this lesson, set up environment first. watch the beginning of this video :
th-cam.com/video/m0LdKZ-prto/w-d-xo.html&ab_channel=JimShapedCoding
Thanks for the video!
Really helpful stuff, many thanks!
Please keep continue this diamond tutorials thanks a lot
The code is exact on my file, yet the try and except block won't work for me. I am certain there is not a typo. But it is not doing the click to close the popup, at 34:40. It still pops up. Any suggestions?
Also had the same problem, then I realized that I typed in:
no_button = driver.find_elements_by_class_name('at-cm-no-button')
When it's actually supposed to be like this:
no_button = driver.find_element_by_class_name('at-cm-no-button')
@@MusouFlurry Thank you for your suggestion. But even taking that into account and looking back to see that, there is no typos even there, and mine was like the one you wrote out suggesting it should be. So I'm honestly still stumped. :/
Nice code but the code does change when you have version 104. It is difficult to try to fix the code to match your tutorial. I say this as I am a novice
Please upload more of this tutorial and also teach automated data collection. Your style of teaching is nice
Beautiful 🙏🏻
It seems the link for the test\jquery... does not work. Would you please check it?
Great Project! Loved the accent. However, there is one thing i would request for the next selenium tutorial, I am would like to learn more about multiple browser window handling and switching. Thank you for this amazing #CrashCourse
9:52 My browser keeps getting closed after running it.. any solution?
Right now filtration is much more difficult as it was when the tutorial was created. The id="filter-class" pair has been removed and there's no single key-value pair that uniquely identifies the Star Rating box.
find_element_by_css_selector(f'div[data-filters-item="class:class={star_value}"]') works
star_filtration_box = self.driver.find_element(By.CSS_SELECTOR, 'div[data-filters-group="class"]')
star_child_elements = star_filtration_box.find_elements(By.CSS_SELECTOR, '*')
@@arekkubea2429 Thanks this worked!
Amazing tutorial!
And as always thank you FCC
It was a great one for sure
At 56:46 timestamp , I am getting this error ->> 'dict' object has no attribute 'to_capabilities' can anyone help me with the issue.
did you find out?
I've just started using selenium and I've created a bot that collects from a bitcoin faucet using a vpn and I'm currently running 10 accounts at once although I need to investigate headless and I need to add some asynchronisty to it.
My chrome version is 118. something what should I do?
Same here, mine is 131, have you figured this out?
Nicely explained man, thanks
Hi, which link is the one you mentioned in your video 44:50, which explains python project structures.
Amazing course! Thank you for share
1:01:04 when i try to run the code, it gives me the error
with Booking() as bot:
AttributeError: __enter__
could you update this course please?
A question to more important fellars here, whatever I did I just couldn't make the driver_path work. Then I checked the os.environ['PATH'] and I saw that when I added the self.driver_path, it didn't add ";" at the end of the line before, compared to the other lines. So I added a ";" at the beginning, like;
driver_path=R";C:\SeleniumDrivers"
Then it worked. Can someone explain what the devilry is that? I know I didn't do something wrong as I downloaded the document in the github and I got the same result until I added that ";".
Thank you so much, bro. Mine didn't work as well until I added the ' ; ' at the beginning
Since PATH is just a string without the semicolon the system would not know where the new enviroment variable begins. I'm not sure why the author did not need to do this though? Maybe the text got somehow added in front of the string and then you don't need ; , but then again you would need ; at the end or it would not work either.
god bless you, man
The link of the test website does not work...
the jquery selenium easy link does not work.
I love this course ❣️