How To Perform Web Scraping In Python Using Selenium

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ธ.ค. 2024

ความคิดเห็น • 91

  • @naveenautomationlabs
    @naveenautomationlabs 4 ปีที่แล้ว +8

    Awesome, I liked this one.

  • @mehranarif8763
    @mehranarif8763 ปีที่แล้ว +1

    Strongly recommended this video bro.... great

  • @SubrotoPaul-uw1ri
    @SubrotoPaul-uw1ri 10 หลายเดือนก่อน +1

    Excellent Tutorial....... Sending Love

    • @Mukeshotwani
      @Mukeshotwani  10 หลายเดือนก่อน

      Thank you! Cheers! Subroto

  • @arvindsah3273
    @arvindsah3273 4 ปีที่แล้ว +1

    This is awesome content. Thanks for sharing/making video on this.
    Gonna try this using Selenium with Java, I know I may have to write some extra lines of code. Specially with respect to merging the 2 arrays, writing the data into excel and at last sending mail with attachment.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว

      Hi Arvind, yes please try with java too because concept is same. If you need an y help then let me know.

  • @JyothiGu
    @JyothiGu 3 ปีที่แล้ว

    Awesome … very clear explanation loved it

  • @wavanstore925
    @wavanstore925 3 ปีที่แล้ว

    Sir i have a doubt if a website has add to cart button like zomato if you click that than popup window shows up now if i want to extract price from it from different restaurant the xpath changes for every restaurant then how to automate it with all restaurant? Pls reply sir.

  • @Sureshezhumalai
    @Sureshezhumalai 3 ปีที่แล้ว +1

    Hi Mukesh,
    Could you please tell us how to do scrape multiple pages with this script
    Thanks

  • @abhishekranjan2617
    @abhishekranjan2617 3 ปีที่แล้ว +2

    Sir, I get an error in append ..
    It shows that :- AttributeError: 'WebElement' object has no attribute 'append'

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Please share screenshot over email mukeshotwani@learn-automation.com

  • @stelvio5213
    @stelvio5213 3 ปีที่แล้ว +1

    Amazing 👏👏👏👏👏

  • @aasifansari9003
    @aasifansari9003 2 ปีที่แล้ว

    Great video , simply explained!

  • @notjust_explorer
    @notjust_explorer 3 ปีที่แล้ว +1

    I have one doubt when I run FOR loop second time to append data in Excel sheet . No data is apended in Excel sheet then I tried to print the data first then append all in sheet. But no data is printed in output. I am not sure why it is happening that first time when I run FOR loop all data prints from list(finallist) but after that how list(finallist) Don't print data. Please help on this

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      Hi Rishabh, please debug your script th-cam.com/video/v_j6iG13va0/w-d-xo.html

  • @ramakrishna-yo2fs
    @ramakrishna-yo2fs 4 ปีที่แล้ว +1

    thank you very much for these useful videos on Python and Selenium. Could you please provide vidoes on developing a simple framework including few scenarios to automate using Python & Selenium on any application.

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว +1

      Yes, soon its coming Rama stay tunned

  • @axelblaze9210
    @axelblaze9210 3 ปีที่แล้ว

    my browser closes automatically when code lines ends even if i havent put driver.quit() function too
    can u help me with that

  • @Tabvincoholic
    @Tabvincoholic 3 ปีที่แล้ว +1

    Can selenium extract images as well from e-commerce along with other details in excel cell

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      You can extract image src in excel.

  • @diegocamelomartinez5566
    @diegocamelomartinez5566 3 ปีที่แล้ว +1

    Hi Mukesh,
    How would you do if the price is not available for one of the phones?
    So basically if the lists that result do not have the same length.
    Cheers

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      Hi Diego you can just write xpath which will only match with nodes which has phone number or you can use findElements then remove elements which does not have phone. Once you have final list then you can export in excel.

  • @sarojkumar815
    @sarojkumar815 3 ปีที่แล้ว

    How if you wanted to add current date and time to the result file in excel as a new column say like DateTime for each line ?

  • @dzlobby7242
    @dzlobby7242 3 ปีที่แล้ว +1

    hello sir,
    i tried to do the same but to aliexpress website.
    i always get just the first 8 results.
    i have used the scroll function (driver.execute_script('window.scrollTo(0, document.body.scrollHeight );')) but it get me the same result.
    some times I get the all data when I scroll manually. but not all the time. any help please
    thank you.

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Mate, you can scroll till the last step or next button. Once you get list which might have uplicate data then you can convert into set.

  • @vivekcv9480
    @vivekcv9480 3 ปีที่แล้ว

    Awesome, I like the way you explained web scraping. Can you please explain data comparison between two excel sheets or files?

  • @jagadishkanthi4796
    @jagadishkanthi4796 3 ปีที่แล้ว

    HiMukesh,
    I have qucik Question - how to get skip with the advertisement/ Deals section to get the correct data.
    Ex - in the above phones example - if the page has the advertised/Sponsored page.
    Which in turn giving the wrong details in combination of price and names.
    Can you plz let us know - how to skip from that with original data

  • @alexiatok8300
    @alexiatok8300 3 ปีที่แล้ว

    Hi Mukesh, thanks for sharing! I realised that the web scrapping stops at page 1. How do you code the loop such that it scrap all pages? thank you

  • @dakshapatel9975
    @dakshapatel9975 ปีที่แล้ว

    Hi, thank you for your demos great content. Do you have the project files in your GitHub repo please?

  • @pankajuprety9216
    @pankajuprety9216 3 ปีที่แล้ว +1

    if huge number of data's is there to extract within pages and inside tabs ,how can we extract standardly without missing datas

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Pankaj you can do in the same manner as I showed or you can use python lib to scrap complete data.

  • @jagkrinolens
    @jagkrinolens 3 ปีที่แล้ว +1

    Thanks a lot . This video is very helpful .

  • @xilllllix
    @xilllllix 3 ปีที่แล้ว

    learned a lot how to use xpaths, thanks!

  • @moisesmasis1981
    @moisesmasis1981 3 ปีที่แล้ว +2

    Can you run this aplication in IIS

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Moises, you can execute python script on any web server or CI sever.

    • @moisesmasis1981
      @moisesmasis1981 3 ปีที่แล้ว +1

      @@Mukeshotwani You can do it in a video

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      sure Moises will try

    • @moisesmasis1981
      @moisesmasis1981 3 ปีที่แล้ว

      ​@@Mukeshotwani Thanks in any video that there is in this platform nobody makes a video using IIS with python web scrapping and I think it would be quite good for you and your growth

  • @shreyashishreya2036
    @shreyashishreya2036 3 ปีที่แล้ว +1

    awesome content .I am facing some issue. 'Workbook' object has no attribute 'active' how can I remove this error. I unable to find your video on workbook

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Shreya, you need to refer this video first for excel with Python th-cam.com/video/nsKNPHJ9iPc/w-d-xo.html

  • @tron__5204
    @tron__5204 2 ปีที่แล้ว

    Sir please tell how to do if my data is present in excel file....how to perform in multiple loops

  • @paritoshsharma9255
    @paritoshsharma9255 4 ปีที่แล้ว +1

    Awesome 👍

  • @kanchanaranga6264
    @kanchanaranga6264 3 ปีที่แล้ว

    Hi Mukesh, can you please tell me how to do web scraping with java and store it in excel as you showed with python??

  • @janicejose5809
    @janicejose5809 3 ปีที่แล้ว +1

    Can someone help me I am getting Stale element reference exception

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hi Janice, You can find element again.

    • @janicejose5809
      @janicejose5809 3 ปีที่แล้ว

      @@Mukeshotwani Thank you

  • @zeeshanrafique4816
    @zeeshanrafique4816 2 ปีที่แล้ว +1

    sir please explain how to put value of send_keys by your keyboard on different positions in code

    • @Mukeshotwani
      @Mukeshotwani  2 ปีที่แล้ว

      Hi Zeeshan what do you mean by different positions in code?

  • @chesswithsarang
    @chesswithsarang 3 ปีที่แล้ว +1

    Why do you use pycharm and not vs code?

    • @xilllllix
      @xilllllix 3 ปีที่แล้ว

      why do ppl like burger king instead of wendy's?

  • @bhargavzilpilwar5144
    @bhargavzilpilwar5144 3 ปีที่แล้ว +1

    Sorry but I dont see link in description to on How to Send Email in Pyhton with SMTP and with attachments.
    Mukesh, please provide link to that.

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      Hi Bhargav, here is the link th-cam.com/video/yzfLVL34_oA/w-d-xo.html

  • @champak_chacha251
    @champak_chacha251 2 ปีที่แล้ว +1

    Sir how can extract data from json website using python?

    • @Mukeshotwani
      @Mukeshotwani  2 ปีที่แล้ว

      Hi Rahul, yes you can extract the data in JSON file as well.

    • @champak_chacha251
      @champak_chacha251 2 ปีที่แล้ว

      But sir how can we extract it. Kindly help me to extract target.com

  • @mrbaertek
    @mrbaertek 3 ปีที่แล้ว

    you are awesome, thank you so much for your videos!!

  • @mehranarif8763
    @mehranarif8763 ปีที่แล้ว +1

    Awesome

  • @sundar7696
    @sundar7696 2 ปีที่แล้ว +2

    Super

  • @paraslohia9292
    @paraslohia9292 3 ปีที่แล้ว +1

    in line 15 how phonename can be iterate?

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว

      Hey Paras, you can iterate them as String or Number.

  • @tauseefanwardo
    @tauseefanwardo 2 ปีที่แล้ว

    Do you post your code on Github as well.

  • @theinnoverse
    @theinnoverse 3 ปีที่แล้ว

    Awesome video

  • @masud0077
    @masud0077 2 ปีที่แล้ว

    thanks for this fantastic tutorial. i am facing problem when i get name and review data because some product does not have review. so when the review list has a gap it does not match with name. i have tried to find the gap but i failed. suppose site has 12 product but 3 of of them with no review. sel. is providing list of 9 review. which 3 product does not have review. if i could fetch single review at a time then i can find the gap can u help me on this, please. thank you

    • @AcezeroGame
      @AcezeroGame 2 ปีที่แล้ว

      You could try implementing Error handling mainly Try Except block and it will surely help you.

  • @madhupincha7898
    @madhupincha7898 2 ปีที่แล้ว +1

    Must watch playlist to learn selenium ❤️

  • @md.rafiuzzamanbhuiyanafrid2087
    @md.rafiuzzamanbhuiyanafrid2087 3 ปีที่แล้ว +1

    ElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//span[text()='Samsung']"} why this?

    • @Mukeshotwani
      @Mukeshotwani  3 ปีที่แล้ว +1

      Hi Rafiuzzaman, you can change xpath. Might be locator must have changed. Please use new locator. Here is the link for xpath th-cam.com/video/As72m9qrAQ8/w-d-xo.html

  • @ramasudha6033
    @ramasudha6033 4 ปีที่แล้ว +1

    Really nyc thank you sir

  • @puspitasahoo3420
    @puspitasahoo3420 2 ปีที่แล้ว +3

    20:28

  • @jeelbenmanojbhaibhuptani1531
    @jeelbenmanojbhaibhuptani1531 2 ปีที่แล้ว

    request to provide solution of this error : "RecursionError: maximum recursion depth exceeded while calling a Python object" at the line no 57 - "server.send_meassage(msg)".

  • @KhalilYasser
    @KhalilYasser 4 ปีที่แล้ว +1

    Thanks a lot. Can you share the code to save some time for us? Regards

    • @Mukeshotwani
      @Mukeshotwani  4 ปีที่แล้ว +1

      Sure Yasser will do soon.

  • @Haroonkhan-lh4kv
    @Haroonkhan-lh4kv 2 ปีที่แล้ว

    Sir plz shire some more informatic video about webscraping

  • @anjaneyuluguddanti7402
    @anjaneyuluguddanti7402 3 ปีที่แล้ว

    no such element: Unable to locate element: {"method":"xpath","selector":"//span[text()='Pedigree']"}
    please i am getting like this help me

  • @kamaleshpramanik7645
    @kamaleshpramanik7645 3 ปีที่แล้ว +1

    Thank you very much ...

  • @KudoSolution
    @KudoSolution 3 ปีที่แล้ว +1

    Great! Thank you!

  • @SanjeevKumar-dd4sd
    @SanjeevKumar-dd4sd 2 ปีที่แล้ว

    I have a image in browser and image has some data can i extract the data from image and print it in terminal

  • @anjaneyuluguddanti5384
    @anjaneyuluguddanti5384 3 ปีที่แล้ว

    Bro I need ur support I want speak personally can u please help me bro I will pay if u teach means please let me know

  • @vaasudhfp2874
    @vaasudhfp2874 3 ปีที่แล้ว

    not working