Python Project - Scrape Countries Population Data From an HTML Table into CSV and Excel Using Python

Поділитися
Вставка
  • Опубліковано 10 вер 2024
  • Proxy Service I use (Affiliate):
    www.scraperapi... Or use amin10 at checkout for 10% off + Get free trial!
    This Python project tutorial explains how we can scrape an HTML table using Python, Requests, BeautifulSoup, and Pandas. This is a step by step tutorial for beginners.
    Along the way I explain why I used each package and the methodology behind scraping html pages from the web using Python.
    At the end I show the easiest way to save Data from a Python list into Excel and CSV using the Pandas Library.
    Subscribe to the Channel! 🙏

КОМЕНТАРІ • 27

  • @JaveGeddes
    @JaveGeddes 2 роки тому +3

    I don't know how this is already 3 months old, and I'm the first comment, but this is an extremely excellent tutorial. You should be very proud of yourself, and I thank you. I am definitely subscribed, & now I'm off to see the rest of your stuff. &

    • @AminBoutarfi
      @AminBoutarfi  2 роки тому +1

      Thank you so much for your support 🙂 Means a lot!

    • @fatihboyar9697
      @fatihboyar9697 Рік тому +1

      great tutorial indeed

  • @vasanthkumarVaithyanathan
    @vasanthkumarVaithyanathan 5 місяців тому

    Absolutely Awesome. Each Explanation is Crystal clear.

  • @sunriseentertainment1572
    @sunriseentertainment1572 2 місяці тому

    Best Video I can say the most easy to scrap data from a table thank you

  • @osoriomatucurane9511
    @osoriomatucurane9511 9 місяців тому

    Awesome. Concise & crystal clear. Thank you Sir for sharing this informative tutorial in such elegant fashion way typically pythonist

    • @AminBoutarfi
      @AminBoutarfi  8 місяців тому

      Thank you for the support 🙏

  • @kenarsenault9863
    @kenarsenault9863 7 місяців тому

    Best tutorial on this subject matter!!!

  • @hilesiz8728
    @hilesiz8728 Рік тому

    Congratulations on a very good content. You write clean code, even someone who doesn't speak English will understand you :=)

  • @Lina-zn1yq
    @Lina-zn1yq Рік тому

    this channel is so underrated

  • @Yaya0601
    @Yaya0601 3 місяці тому

    Thank you. I tried follow your video, but it does not recognize the requests

  • @hichamtech7913
    @hichamtech7913 8 місяців тому

    Thank you si Amin

  • @user-lg7rw9ne7m
    @user-lg7rw9ne7m 6 місяців тому

    i can scrape a range of links?

  • @أبويزيد-ض5ي
    @أبويزيد-ض5ي Рік тому

    0:20 Do you have the link for this table(dataset), so we can practice while watching the video?

  • @boutarfimanel2893
    @boutarfimanel2893 Рік тому

    Thank you 😊 amazing 😍

  • @sujithsaikalakonda4863
    @sujithsaikalakonda4863 Рік тому

    Great explanation.

  • @Westdeutschland
    @Westdeutschland Рік тому

    Great tutorial

  • @InnovateEduTech
    @InnovateEduTech Рік тому

    If td and tr no role and no class then how we access the data?

    • @AminBoutarfi
      @AminBoutarfi  Рік тому

      That depends! The idea is to use the HTML tags and CSS attributes to access it.

  • @reirto8198
    @reirto8198 Рік тому

    why does it say list object has no attribute text

    • @AminBoutarfi
      @AminBoutarfi  Рік тому

      I need more info so that I can help you?

    • @reirto8198
      @reirto8198 Рік тому

      @@AminBoutarfi i tried to do it on some other websites and it couldnt convert the content of the list to a text, while when i did it with the worldometers website it worked just fine

    • @AminBoutarfi
      @AminBoutarfi  Рік тому +1

      @@reirto8198 I don't know what website you tried it on, but that't the thing with web scraping, different websites require different solutions.
      The goal is to understand the basics and then try to get familiar with as many concepts as possible.

    • @anupamaa_raii
      @anupamaa_raii Рік тому

      @@reirto8198 you can try converting the list into a string and slicing to get the data you require. I had the same problem and converting it into string and slicing worked for me.

    • @osoriomatucurane9511
      @osoriomatucurane9511 9 місяців тому

      ​@@AminBoutarfiI absolutely agree with. You need to understand what soup objects the different search methods available (find, find_all,.....) return. In addition to that, you need to consider what are you paasing, whether it is a tagname, class, id.....