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
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.
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) `
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!
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 🙏
@@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 )
options = webdriver.ChromeOptions() options.add_experimental_option("detach",True) driver = webdriver.Chrome(options=options) Use this code if your chrome crash.
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.
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.
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.
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"
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!
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 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.
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"
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.
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.
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
all works, before u start this lesson, set up environment first. watch the beginning of this video : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-m0LdKZ-prto.html&ab_channel=JimShapedCoding
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
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
"Thank you sincerely for creating and sharing the video. I'm incredibly grateful for the wealth of knowledge I gained about coding through your content. The concepts I learned, particularly finding new locators and changing the codes, have provided me with valuable opportunities to put my skills to the test. I can't express enough how much I appreciate your efforts in helping me expand my coding abilities. Thank you wholeheartedly once again!"