Web Scraping to CSV | Multiple Pages Scraping with BeautifulSoup

Поделиться
HTML-код
  • Опубликовано: 6 ноя 2022
  • In this tutorial you will learn how to scrape multiple web pages using BeautifulSoup and export the results to a CSV files using Pandas Library.
    We use books.toscrape.com as the web scraping playground and get access to the alt attribute of the images and the name of the classes.
    ------10 Web Scraping Project Ideas ------
    pythonology.eu/10-ideas-for-w...
    ------Support Pythonology------
    www.buymeacoffee.com/pythonology
    ------Best Online Resource for Python------
    Datacamp: The best online resource to learn Python, Web Scraping, Data analysis, and Data Science (Affiliate link)
    datacamp.pxf.io/pythonology
    ------Sourcecode link------
    github.com/Vidito/webscraping...
  • НаукаНаука

Комментарии • 133

  • @skye0613
    @skye0613 3 месяца назад +3

    Finally, a video i can understand and doesn't make me feel dumb.
    Thank you good sir!

  • @abdulwali4920
    @abdulwali4920 Год назад +13

    literally the best video on webscrapping....i have watched hundreds of videos but this is the best.

    • @Pythonology
      @Pythonology  Год назад +1

      Thank you very much Abdul Wali for your nice words. Very encouraging :)

  • @homeoffice3524
    @homeoffice3524 9 месяцев назад +3

    Finally! Really clean and easy to follow scraping video.

  • @zedascouve2
    @zedascouve2 7 месяцев назад

    Absolutely jaw-dropping the power of web scraping. Congrats for the wonderful and comprehensive video. Waiting for more!!!

  • @Lets_coding18
    @Lets_coding18 4 месяца назад

    Such a GreaT Explanation Dear
    JusT Love it😘
    Love From India 🇮🇳NamsTe🙏

  • @knoxholst67901
    @knoxholst67901 Год назад +12

    I just wanted to let you know that I really enjoyed this video. I was feeling like learning python was stupid. Then I found you doing a cool project and it was easy to follow. I am inspired again thank you.

  • @samuelebojielu855
    @samuelebojielu855 8 месяцев назад +2

    Thank you so much for this video. I have watched several web scraping videos but this is absolutely the best so far.

  • @mattbaker6475
    @mattbaker6475 3 месяца назад +1

    Great video!
    You're not getting enough credit for how well this is made.

  • @appleestrada6810
    @appleestrada6810 4 месяца назад +1

    This is by far THE best and easiest to understand explanation I’ve heard about using python to scrape data. Thank you for your effort in creating this video. You got a new subscriber!

  • @extropiantranshuman
    @extropiantranshuman 7 месяцев назад +1

    wow - best tutorial so far on beautifulsoup! Thank you!

  • @sundy93
    @sundy93 2 месяца назад

    This video is such a relief ,absolutely the best material about scraping ! Thank you so much!

  • @BenjaminBalaj-yp8zk
    @BenjaminBalaj-yp8zk Год назад

    You explain everything very clearly. Everything makes sense now!

  • @osoriomatucurane9511
    @osoriomatucurane9511 6 месяцев назад

    So awesome! Consice & crystal clear! You are absolutely a legend.❤

  • @satishm5260
    @satishm5260 7 месяцев назад

    This is the most on point tutorial I ever watched. No bullshit, no jargon, Just pure knowledge. Thank you Sir, I learnt a lot from this small video.

  • @mohammedtofa431
    @mohammedtofa431 Месяц назад +1

    I have been searching for a video like this forever. Thank God I landed on your page. Really wonderful and amazing video showing step by step. You are a living legend. Just subscribed as well.

  • @everyany4161
    @everyany4161 11 месяцев назад +1

    Thank you so much for this video! It's literally an answered prayer for me. 🙏

  • @user-hq8gd9jx8p
    @user-hq8gd9jx8p 10 месяцев назад

    I just loved it . I used to think web scraping is too hard but when I saw your video it is like so simple that even 10 years old can also understand. Simply great job 👏

  • @ryansmithza
    @ryansmithza Год назад

    Exactly what I was looking for! Thanks!

  • @ghashanti
    @ghashanti Год назад +2

    This was great content. You made web scraping super easy.

  • @janp3648
    @janp3648 Год назад

    Omg .. this is such a perfect, informative, easy to understand explanation ! Thx a lot.

  • @SandeepGurjar-ko5ju
    @SandeepGurjar-ko5ju 11 месяцев назад +2

    Your work needs to be appreciated man. The way you explain things in a calm, composed and soothing voice. The simplicity of the tutorial indicates your grasp on the web scraping. Thank you.

    • @Pythonology
      @Pythonology  11 месяцев назад

      Appreciate it, Sandeep.

  • @muhammadmubeen8452
    @muhammadmubeen8452 7 месяцев назад +1

    Thank you very much sir I was watching many tutorials and was getting confused to understand the html structure then I found your video you explained everything beautifully I completed my project successfully thanks a lot sir❤

  • @randomperson-gp2wd
    @randomperson-gp2wd 4 месяца назад

    Thanks a lot. With some basic level in python and 0 background in programming, I was able to successfully do a project for my master thesis related to media coverage about certain topic.

  • @dawnS33ker
    @dawnS33ker 9 месяцев назад

    This video is an absolute gem. Thank you for this..

  • @pannusingchauhan6883
    @pannusingchauhan6883 6 месяцев назад

    this is just crazyyy. loved the tutorial

  • @czr372
    @czr372 Год назад

    Thanks a lot for all this web scrapping tutorials! Ill try to do my own scraps now!

  • @svenGPT
    @svenGPT 10 месяцев назад

    Just found it and love it. Thank you!

  • @nairchandnichandran7503
    @nairchandnichandran7503 6 месяцев назад +1

    Wonderful!. Simple and concise🥰

  • @sabrinaazwa759
    @sabrinaazwa759 18 дней назад +1

    thanks alot for the detailed tutorial!!!

  • @richardharris-to3mc
    @richardharris-to3mc Год назад +1

    top notch. I managed to follow this, so thankyou!

  • @rambhupal8870
    @rambhupal8870 Год назад +2

    Its just really awesome and very easy to understand also and i have submitted this as a mini project. Thank You brother.

  • @mynshk
    @mynshk Год назад

    Many thanks for your demonstration! :D

  • @raedkm
    @raedkm 6 месяцев назад

    Thanknyou for this clear and easy to follow video.

  • @netacklee
    @netacklee 6 месяцев назад

    Wow, this video is so helpful, thank you!

  • @user-kl8om1ln3p
    @user-kl8om1ln3p 10 месяцев назад +1

    Thanks a lot for this detailed video. Hoping to see more video's like this.

  • @Raulenz
    @Raulenz 5 месяцев назад

    Thanks, great video. Excellent explanation and great english.

  • @gur0004
    @gur0004 Год назад +1

    lovely stuff. I thoroughly enjoyed it.

  • @leibaleibovich5806
    @leibaleibovich5806 Год назад +1

    Thank you for the video! It is helpful, indeed.

  • @lesotv1056
    @lesotv1056 4 месяца назад

    OMG, I am so impress thank you so much for this wonderful lesson. I cant believe I got this for free . God bless you.

  • @SkillsGear
    @SkillsGear 28 дней назад

    Finally, a video that puts paid courses to shame! Hats off to you for the great tutorial! You just did not explain, the way you went back and forth helped me understand a lot. Kudos! Could not resist the urge to hit the like and subscribe button. Will definitely visit your channel for more guides and tutorials! ♥

  • @marcoschwarz4640
    @marcoschwarz4640 10 месяцев назад +4

    I watch a lot of videos about programming and most of them are really good. However, this really is a standout piece. The way it combines theory and practice is second none. Well done,sir

  • @user-ks9fx7cg3r
    @user-ks9fx7cg3r 6 месяцев назад +1

    You really did make a great video.Thank you

  • @catchiemitakata2142
    @catchiemitakata2142 Месяц назад

    The best tut on web scraping. Very beginner friendly. Keep it up

  • @wanangwalumbaningwira3871
    @wanangwalumbaningwira3871 7 месяцев назад +1

    ooooooooooooooooooooohhhh I really love this video you saved me big time. This is really outstanding, well detailed and you explainations are very logical and clear

  • @Birwi
    @Birwi 4 месяца назад

    Really helpful, thank you!

  • @NikhilPawar151
    @NikhilPawar151 Год назад +1

    Great video. I really like the way you explain the concepts. Everything working fine and easy to understand

  • @olubukola107
    @olubukola107 Год назад +1

    Thank you 🙏 so easy to understand and helpful

  • @jeinnerabdel
    @jeinnerabdel Год назад +3

    Great video! I wrote the code while you were explaining it and I kinda grasped the idea behind what you were doing. The only thing I don't understand is about the indentation and how it affects the for structure. In other languages, you end the for with some code and nest them like any while-do or if-else-endif type of stuff. I also thought that Python was like Javascript where data would automatically be translated on each variable based on it's content Var1 = Here you go (text) or Var1 = 12 (num) but as I saw on your example, you have to transform data into numbers even if they are actually numbers already. Interesting!

  • @newperspective9
    @newperspective9 11 месяцев назад

    I saw what I need to saw, Thank you!!!

  • @payamsarwar5611
    @payamsarwar5611 9 месяцев назад +1

    Very productive, thank you

  • @pasindumadushan474
    @pasindumadushan474 10 месяцев назад +1

    Thank You So much SIr!

  • @Bljkxx.x
    @Bljkxx.x 8 месяцев назад

    Thank you so much for this. Thank you

  • @MKOladapo
    @MKOladapo 5 месяцев назад

    Great lesson...Very resourceful

  • @ephraimmotho887
    @ephraimmotho887 Год назад +2

    Great tutorial yet again... This channel is so valuable for people who want to learn programming but do not have the money to go to school for it... Are there any other similar channels on youtube or outside the platform (websites etc.) that offer such great value but may not be popular? Please reply if you even have one suggestion. It is really helpful

  • @aspirant9511
    @aspirant9511 Год назад +1

    Very well explained ...thank u..

  • @joelngige5776
    @joelngige5776 11 месяцев назад

    Fantastic video on web scraping

  • @dimi_ga
    @dimi_ga 5 месяцев назад

    Thank you very much, you helped me a lot with your vid. 🙏

  • @deniskarani9953
    @deniskarani9953 Год назад

    thank you, sir!!! I have really learned a lot from you.

  • @ihebbibani7122
    @ihebbibani7122 Год назад +1

    Thanks a lot. Subscribed.

  • @lesteravecilla77
    @lesteravecilla77 Год назад

    Super Thanks for this video. It is very clear and useful for people who like start web scraping like me. Good job and keep it up! 👏🙂

  • @PP-pd3pf
    @PP-pd3pf 10 месяцев назад

    Thank you for the great content.

  • @AmanKumar-xw5bs
    @AmanKumar-xw5bs 8 месяцев назад

    wonderful sir ! Learnt a lot

  • @debasishrajbehera
    @debasishrajbehera Год назад +2

    thank you so much sir....................i learned a lot .....its so helpful to me..🙏

  • @abdullahattia2491
    @abdullahattia2491 Год назад

    thank you so so so much
    very helpful!
    liked, and subbed

  • @mister_maxwell
    @mister_maxwell Год назад

    Very very good, I learned so much new and interesting stuff.

  • @tundebadmus7702
    @tundebadmus7702 Год назад

    You explain really well.. keep it up

  • @gadomix3989
    @gadomix3989 Год назад

    Thank you for a great video realy its cool project ever seen

  • @saharyarmohamadi9176
    @saharyarmohamadi9176 Год назад +1

    Thank you very much, very good and detailed explanation

  • @mohamadehtheshams2527
    @mohamadehtheshams2527 11 месяцев назад +1

    Great Sir Today I learned how to do web scrapping .. Nicely Explained 👍. Please make more content

  • @deepakr229
    @deepakr229 Год назад

    Thank you 🎉

  • @swatisingh-yw1fw
    @swatisingh-yw1fw Год назад

    it was very helpful video, keep on making such video.

  • @bashirahsalami3408
    @bashirahsalami3408 7 месяцев назад +2

    Thank you very much Pythonology. This was well-explained and very easy to understand.

  • @venegas7303
    @venegas7303 2 месяца назад

    Thank you

  • @BESTANIMENETWORK
    @BESTANIMENETWORK Год назад

    great video
    very detailed

  • @ibrahimaboelsoud7881
    @ibrahimaboelsoud7881 10 месяцев назад +1

    24:53 what a vim move 😄.

  • @samchimaobi3398
    @samchimaobi3398 Год назад

    this is a wonderful video

  • @desco0074
    @desco0074 Год назад +1

    thank you man

  • @fredquiemby8024
    @fredquiemby8024 Год назад +1

    Thanks

  • @user-ju7mb5dl5d
    @user-ju7mb5dl5d 2 месяца назад

    This is very cool
    Keep.it up bro...

  • @khaledhamdy9944
    @khaledhamdy9944 Год назад

    Great my friend

  • @danielomoregie7603
    @danielomoregie7603 11 месяцев назад +1

    This is the best web scrapping video on the internet

  • @fpldaily5172
    @fpldaily5172 Год назад

    how do i webscrape the page and the content in the page eg, your video extracts the title, price etc but lets say I also want to extract the book page and the content after the book the book page
    like some e-commerce sites show the products name, price etc but when I click the page it shows decscriptions, reviews , and more pictures of the product how do I extract that aswell?
    Thanks mahn I like your work!

  • @mavisadjei4192
    @mavisadjei4192 Год назад

    Thank you very much. Is there a good book you can recommend?

  • @ayoubcharbaji884
    @ayoubcharbaji884 2 месяца назад

    hi sir, well i have a question about the page numbers, if i'm working with for exemple three websites and i don't know how many pages they've got so what should i do to make my code scrape all the products ?

  • @AdamDoe-br5tw
    @AdamDoe-br5tw 11 месяцев назад

    Great tutorial Thanks, now what if the pages have different/variable names like site/brand/VariableBrandname and I only have a list of the pages
    How to set the "i" variable to look into a set of "variablebrandname"?

  • @AnulithaVardhanMarripeddiVijay
    @AnulithaVardhanMarripeddiVijay 2 месяца назад

    I have the prices in tags and soup.find ignores it all together. Any idea how to handle that?

  • @redskins3186
    @redskins3186 Месяц назад

    I'm starting a grocery shopping website is there any way I can do this on a grocery store website? Where I can take everything, turn it into a CSV file and then just put it in my website. Basically like just taking their page with all the features exporting it into a CSV file and and then importing into my website. And having it all be the same exact way as on the grocery stores website with features and all? Please help lol

  • @ayomidealatake5244
    @ayomidealatake5244 11 месяцев назад

    and i want to access the text in span tag
    and this span tag is within a 1i tag
    pls how can i go about it
    because I tried using spag tag it not giving right text

  • @ThuyPham-xt7jw
    @ThuyPham-xt7jw 6 дней назад

    can i import an array for list of urls?

  • @matteos9783
    @matteos9783 Год назад

    Thanks, but what if I want follow the subpage of every book and extract the informations in these pages? I mean before I extract the informations in the first page, then go into every subpage of the books and finally grab the pages informations

  • @AsmaaMGaber
    @AsmaaMGaber 4 месяца назад

    very informative video, thank you for your efforts.
    I use jupyter notebook and I wrote the exact code, yet it doesn't scrap all pages and it scrap only the last number in range. do you have any idea what could cause this error?

  • @ayomidealatake5244
    @ayomidealatake5244 11 месяцев назад

    pls in a situation whereby i have multiple p tag and I want the text of the second p tag and no class or attrs to differentiate it
    pls how can i go about it

  • @aryanpatel8140
    @aryanpatel8140 10 месяцев назад

    Nice video and very well explained❤
    Just wanted to know how do I print the genre of every book next to it?

  • @nadareham9784
    @nadareham9784 11 месяцев назад

    Hello I am struggling with something . Can you help me . I can't see ol but all started with section how to run soup to grab exact data .

  • @fraabru
    @fraabru 7 месяцев назад

    Hey so, what do you do when you get the html from the website and its not the right html?? the elements that are visible when i inspect the webpage are not the same as when i request the website data, like there is a list of players and they all have an href, but if i find href and print it says none
    Not sure if i am doing something wrong or...
    cool video tho, made me want to try it

    • @osoriomatucurane9511
      @osoriomatucurane9511 6 месяцев назад

      I am struggling with the same issue to extract the players stats on EPL for my data analytics project

  • @annicesullivan
    @annicesullivan Месяц назад

    Nice tutorial on scraping multiple pages to CSV with BeautifulSoup! Any tips on reliable proxies for handling large scraping jobs like this? Heard Proxy-Store offers specialized scraping packages, anyone tried them out?

  • @dreamer14492
    @dreamer14492 Месяц назад

    you pulled the name from the image alternative tag sometimes image alternative can be anything instead pulling the title from the h3 tag and title attribute will be better in my opinion

  • @chiedozieehirim5659
    @chiedozieehirim5659 Год назад +1

    Thanks a lot. It helped solve a problem.
    I have a question though.
    How do u handle 403 and 503 status_codes errors when scrapping a website?

    • @Pythonology
      @Pythonology  Год назад

      403 and 503 status code errors, indicate that the server is refusing to fulfill the request. To handle these errors, you can use the requests library to make the request and check the status code.
      One way to handle these errors is to use try-except blocks to catch the error and handle it appropriately. For example, you could include a sleep function to wait a certain amount of time before trying again, or you could implement a retry loop to keep trying until the request is successful. Another approach is to use a library like requests-html which has a built-in support for handling these errors and retrying failed requests automatically. Also, you can use a User-Agent in the headers to make the request appear as if it was coming from a browser instead of a scraper, as some websites block requests from known scraper IPs and user-agents.

  • @jonice4229
    @jonice4229 Год назад

    i'm getting 429 error too many requests, how i can fix it? thanks for amazing tutorials

  • @evoplayz7136
    @evoplayz7136 Год назад

    Would you please make a video on how to scrape the data inside of each link