BeautifulSoup + Requests | Web Scraping in Python

Sdílet
Vložit
  • čas přidán 26. 06. 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

Komentáře • 54

  • @codingcontraptions6202
    @codingcontraptions6202 Před rokem +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 Před 10 měsíci +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 Před 6 měsíci +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 Před rokem

    Alex thanks for making beautifulsoup as simple as possible

  • @TheSystemsConsulting
    @TheSystemsConsulting Před rokem +2

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

  • @kachekijaanlega
    @kachekijaanlega Před měsícem +6

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

  • @devanshagarwal97
    @devanshagarwal97 Před rokem +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 Před rokem +2

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

    • @AlexTheAnalyst
      @AlexTheAnalyst  Před rokem +1

      Hope you enjoyed it!

    • @AwanievaStudios
      @AwanievaStudios Před rokem

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

  • @gloriabukachi1
    @gloriabukachi1 Před 10 měsíci

    So easy to understand. Thank you teacher

  • @0x007A
    @0x007A Před rokem +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 Před 10 měsíci

      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 Před 2 měsíci

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

  • @Aipoweredchronicle
    @Aipoweredchronicle Před 8 měsíci

    its really simplified. Thanks

  • @Unknown_mallu278
    @Unknown_mallu278 Před 6 měsíci

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

  • @robbylebotha
    @robbylebotha Před 10 měsíci +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 Před 10 měsíci

      how to change every request ip address

    • @theHarbingerOfDoom
      @theHarbingerOfDoom Před 8 měsíci

      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 Před 10 měsíci

    crystal clear explanation 😎

  • @yosoydonger6325
    @yosoydonger6325 Před 4 měsíci

    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 Před 4 měsíci

    This should be the 2nd video of the playlist

  • @gokong-dc6xi
    @gokong-dc6xi Před měsícem

    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 Před 2 měsíci

    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 Před 8 měsíci

    Thankyou Alex!

  • @victorjonesofficial
    @victorjonesofficial Před 6 měsíci

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

  • @pavithrap769
    @pavithrap769 Před měsícem

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

  • @AwalSharif-ix5yk
    @AwalSharif-ix5yk Před měsícem

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

  • @ChrisTDBCODE
    @ChrisTDBCODE Před 7 měsíci

    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 Před 7 měsíci

      same here, let me know if you find a fix

  • @uplifthabesha754
    @uplifthabesha754 Před rokem

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

    • @TheKingjake03
      @TheKingjake03 Před 10 měsíci

      No but you can use selenium for that

  • @venegas7303
    @venegas7303 Před 3 měsíci

    Thank you

  • @lilyrosestracke4591
    @lilyrosestracke4591 Před 6 měsíci

    Thanks.

  • @kaliportis
    @kaliportis Před rokem

    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 Před 4 měsíci

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

    • @harisshi
      @harisshi Před 3 měsíci

      in jupyter type BeautifulSoup (b and s in caps)

  • @tusharpal5293
    @tusharpal5293 Před rokem

    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 Před 10 měsíci

      Capital letter B

    • @harisshi
      @harisshi Před 3 měsíci

      in jupyter type BeautifulSoup (b and s in caps)

  • @fontageenterprise6268

    What series is this video part of?

    • @AlexTheAnalyst
      @AlexTheAnalyst  Před rokem +2

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

  • @tang0kat318
    @tang0kat318 Před 11 měsíci

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

    • @KatzeMelli
      @KatzeMelli Před 3 měsíci

      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 Před 25 dny

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

    • @Alien-by3gb
      @Alien-by3gb Před 19 dny

      Yes, ofc you can 😅

    • @p.creation01
      @p.creation01 Před 19 dny

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

  • @robydivincenzo821
    @robydivincenzo821 Před měsícem

    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 Před rokem

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

  • @phatomphreak5965
    @phatomphreak5965 Před 18 dny

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