BeautifulSoup + Requests | Web Scraping in Python

Поділитися
Вставка
  • Опубліковано 26 чер 2023
  • Take my Full Python Course Here: bit.ly/48O581R
    In this Web Scraping tutorial we are going to be looking at BeautifulSoup and Requests!
    Website Link: www.scrapethissite.com/pages/...
    GitHub Code: bit.ly/41XuwhA
    ____________________________________________
    SUBSCRIBE!
    Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
    ____________________________________________
    RESOURCES:
    Coursera Courses:
    📖Google Data Analyst Certification: coursera.pxf.io/5bBd62
    📖Data Analysis with Python - coursera.pxf.io/BXY3Wy
    📖IBM Data Analysis Specialization - coursera.pxf.io/AoYOdR
    📖Tableau Data Visualization - coursera.pxf.io/MXYqaN
    Udemy Courses:
    📖Python for Data Science - bit.ly/3Z4A5K6
    📖Statistics for Data Science - bit.ly/37jqDbq
    📖SQL for Data Analysts (SSMS) - bit.ly/3fkqEij
    📖Tableau A-Z - bit.ly/385lYvN
    Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!
    ____________________________________________
    BECOME A MEMBER -
    Want to support the channel? Consider becoming a member! I do Monthly Livestreams and you get some awesome Emoji's to use in chat and comments!
    / @alextheanalyst
    ____________________________________________
    Websites:
    💻Website: AlexTheAnalyst.com
    💾GitHub: github.com/AlexTheAnalyst
    📱Instagram: @Alex_The_Analyst
    ____________________________________________
    All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for

КОМЕНТАРІ • 54

  • @codingcontraptions6202
    @codingcontraptions6202 Рік тому +20

    This is simply amazing! I have spent hours trying to figure out how to do a basic scrape and finally this video did it. I truly appreciate you sir!

  • @Kicsa
    @Kicsa 10 місяців тому +1

    I went over the documentation for BeautifulSoup but watching your video is reinforcing everything I read. I will be watching the rest of your videos on this, thanks!

  • @sj1795
    @sj1795 6 місяців тому +4

    Like I said in my last comment, I'm really enjoying this mini series on webscraping. You're a PHENOMENAL instructor. As always, THANK YOU ALEX!!

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

    Alex thanks for making beautifulsoup as simple as possible

  • @TheSystemsConsulting
    @TheSystemsConsulting Рік тому +2

    Thanks Alex for this second video on the web scrapping series!

  • @kachekijaanlega
    @kachekijaanlega Місяць тому +6

    it should be "html.parser" not just "html".

  • @devanshagarwal97
    @devanshagarwal97 Рік тому +3

    I just remebered my first data scrapping project using BeautifulSoup looking at this video. Thank you very much Alex for sharing this video. It's a great start for anybody looking to scrape data from various sources and easy to grasp when compared to tools like Selenium.

  • @AwanievaStudios
    @AwanievaStudios Рік тому +2

    I have been waiting for the next video since you started the Web scraping series. Thank you Alex 😊

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

      Hope you enjoyed it!

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

      @@AlexTheAnalyst 101% I enjoyed every minute. Anticipating the next! Thank you!

  • @gloriabukachi1
    @gloriabukachi1 10 місяців тому

    So easy to understand. Thank you teacher

  • @0x007A
    @0x007A Рік тому +6

    A caveat worth mentioning is to read the terms of use for any website or data source to ensure web scraping or other automated non-API retrieval method is allowed.

    • @robbylebotha
      @robbylebotha 10 місяців тому

      Lol if you are going through the effort of scraping, you probably don't care. My government is too incompetent to have ANY API to give access to vital public information, they instead have it on outdated websites that aren't even mobile friendly. Sooooooo.....
      Actually one of the most highly used apps in my country scrapes data, it's been years and the government still hasn't built an API, they print out a basic excel like table of the data. They infact tell us to download that very app.

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

    Thank youu for your videoss , you're a life saver

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

    its really simplified. Thanks

  • @Unknown_mallu278
    @Unknown_mallu278 6 місяців тому

    Hello. I have installed requests module but then also error occurs as no module named requests.why this happens?

  • @robbylebotha
    @robbylebotha 10 місяців тому +10

    Very important, DO NOT forget to use a timer otherwise you will find yourself causing DOS on the website you're scraping from or your IP being blocked by the site.
    Load the page in a browser and copy the page source when building your scraper.

    • @satheeshp2384
      @satheeshp2384 10 місяців тому

      how to change every request ip address

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

      Hey man, I don't quite understand what you are referring to in the second paragraph, wouldn't that be the same as:
      url = '...'
      page = requests.get(url)
      ?

  • @mohdsiddiq5752
    @mohdsiddiq5752 10 місяців тому

    crystal clear explanation 😎

  • @yosoydonger6325
    @yosoydonger6325 4 місяці тому

    When I use this method, it doesnt give me all the site data. I'm guessing its because its a subscriber only webpage. Is there a way to bypass this?

  • @jmc1849
    @jmc1849 4 місяці тому

    This should be the 2nd video of the playlist

  • @gokong-dc6xi
    @gokong-dc6xi Місяць тому

    Hello you mentioned in your video that beautiful soup is a "snapshot" of the web page. Can we use beautiful soup to automatically update the value of something in real time? For example stock prices or currency exchange rate or price of bitcoin...etc.

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

    Hello I am new here , I actually first found the last video in this list then I heard the word previously so I searched and found the list but also you are referring to previous videos so I now am following alright but I was wondering is this part of another bigger playlist ?

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

    Thankyou Alex!

  • @victorjonesofficial
    @victorjonesofficial 6 місяців тому

    Please Alex can you do a video on how to install beautifulsoup using Anaconda prompt

  • @pavithrap769
    @pavithrap769 Місяць тому

    I'm getting fail to fetch data. could please anyone tell me what to do?

  • @AwalSharif-ix5yk
    @AwalSharif-ix5yk Місяць тому

    I'm getting errors
    When I do requests.get(url)

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

    For some reason when I run requests.get(url) it doesnt give me any status code whatsoever, I have also tried using the .status_code and nothing gets returned to me. I also checked and both Beautifulsoup and requests are installed. Is there anything I can try to fix this?

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

      same here, let me know if you find a fix

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

    can you interact using beautiful soup like clicking or entering data in an input tab

    • @TheKingjake03
      @TheKingjake03 10 місяців тому

      No but you can use selenium for that

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

    Thank you

  • @lilyrosestracke4591
    @lilyrosestracke4591 6 місяців тому

    Thanks.

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

    Hello I am an aspiring data analyst I have been watching your "how to build a resume videos"; in one of them, about three years ago, your were reviewing resumes and I wanted to know if you would be willing to review mine (not video or anything), thank you for your hard work ^_^

  • @moabdullwahab6313
    @moabdullwahab6313 4 місяці тому

    Anyone help me
    ImportError: cannot import name 'BeautifulSoup' from 'bs4' (unknown location)

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

      in jupyter type BeautifulSoup (b and s in caps)

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

    i am getting this error
    ImportError: cannot import name 'beautifulSoup' from 'bs4' (C:\Users\ASUS\anaconda3\lib\site-packages\bs4\__init__.py)
    can you tell how to measure it.

    • @uartim
      @uartim 10 місяців тому

      Capital letter B

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

      in jupyter type BeautifulSoup (b and s in caps)

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

    What series is this video part of?

    • @AlexTheAnalyst
      @AlexTheAnalyst  Рік тому +2

      It's the Web Scraping Series - it'll be a mini series in the Python series :)

  • @tang0kat318
    @tang0kat318 11 місяців тому

    I have an issue I get an error at 4:13

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

      i assigned a variable to it like that: ' soup = BeautifulSoup(website.text, 'html')' which you then have to return in the end as well. Seemed to solve the error for me

  • @p.creation01
    @p.creation01 25 днів тому

    i might sound a complete noob , but can i do this on vs code?

    • @Alien-by3gb
      @Alien-by3gb 19 днів тому

      Yes, ofc you can 😅

    • @p.creation01
      @p.creation01 18 днів тому

      @@Alien-by3gb hehhe am not a noob anymore bro
      ask me anything

  • @robydivincenzo821
    @robydivincenzo821 Місяць тому

    Merci Alex pour tes supers vidéos ! Voici un post à venir qui pourraient intéresser plusieurs abonnés et autres, c'est le fait de pouvoir trouver comment cliquer sur les choix de demandes de consentements comme sur le site Mappy, qui contient une masse d'infos de Pros et surtout leur email..., ais il y a des fenêtres qui sont bloquantes et difficiles à contourner ("Accepter & Fermer" + "Continuer sans accepter" + "Connexion" ...), merci pour ton écoute? Roby

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

    can someone hire me?! I know sql, tableau and excel

  • @phatomphreak5965
    @phatomphreak5965 18 днів тому

    BeautifulSoup(r.text, 'html.parser')
    add .parser else a warning will appear