MENU

Fun & Interesting

Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup Library)

Keith Galli 39,384 10 months ago
Video Not Working? Fix It Now

Get started w/ Bright Data + $15 free credit using this link! https://brdta.com/keithgalli In this video, we're diving into advanced web scraping techniques with Python. If you haven't seen my overview of the Beautiful Soup library, check it out first for some foundational knowledge. Web scraping is a highly valuable skill, especially for freelance work. This tutorial will take you through sophisticated scraping methods, using Walmart as an example. Before we start, a big thank you to our sponsor, Bright Data. They offer proxy tools that make advanced web scraping much easier, allowing you to bypass restrictions set by websites. Check out their data sets marketplace for quick access to various data. In this video, we'll cover: - Setting up and understanding the HTML structure of a web page - Extracting data using Beautiful Soup and handling dynamic content - Implementing headers to avoid detection - Parsing JSON data for efficient scraping - Using proxies with Bright Data to bypass IP blocking - Error handling and retries in scraping - Storing scraped data and handling multiple search queries If you need help getting started with web scraping, check out my original tutorial on BeautifulSoup: https://youtu.be/GjKQ6V_ViQE?si=f9Xo0ING4fNLhLx2 Helpful Links: GitHub Repository with Code Examples: https://github.com/KeithGalli/advanced-scraping Video Timeline! 0:00 - Intro & Overview 1:30 - Identifying HTML Structure for Scraping (from Walmart) 4:26 - Writing Python BeautifulSoup Code to Extract Info from Walmart.com 7:22 - Implementing modified request headers to avoid detection 6:10 - Handling Dynamic Content 8:00 - Implementing Modified Request Headers to Avoid Detection (look more human when scraping) 9:30 - Parsing Complicated JSON Data (Using LLMs to help) 15:28 - Extending our Code to Collect Info on Many Products (Automating Search) 24:45 - Improving our Code (avoiding duplicates, multiple search terms, using a queue, etc.) 27:20 - Setting Up Proxies with Bright Data (Get around IP Address blocks) 36:35 - Error Handling and Retries 39:36 - Automating actions on pages with Selenium 41:42 - Conclusion & Next Steps I hope you find this tutorial useful. If you did, please give it a thumbs up and subscribe to the channel for more tutorials. Let me know in the comments how you plan to use these web scraping techniques in your projects. Enjoy scraping! ------------------------- Follow me on social media! Instagram | https://www.instagram.com/keithgalli/ Twitter | https://twitter.com/keithgalli TikTok | https://tiktok.com/@keithgalli ------------------------- Practice your Python Pandas data science skills with problems on StrataScratch! https://stratascratch.com/?via=keith Join the Python Army to get access to perks! YouTube - https://www.youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join Patreon - https://www.patreon.com/keithgalli *I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

Comment