Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup Library) @KeithGalli
Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup Library)  @KeithGalli
Uploaded June 2024 | Updated November 2026, 3 hours ago
Get started w/ Bright Data + $15 free credit using this link!
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:
youtu.be/GjKQ6V_ViQE?si=f9Xo0ING4fNLhLx2

Helpful Links:
GitHub Repository with Code Examples: 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 | instagram.com/keithgalli
Twitter | twitter.com/keithgalli
TikTok | tiktok.com/@keithgalli

-------------------------
Practice your Python Pandas data science skills with problems on StrataScratch!
stratascratch.com/?via=keith

Join the Python Army to get access to perks!
YouTube - youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join
Patreon - 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.
Advanced Web Scraping Tutorial! (w/ Python Beautiful Soup Library)Solving real world data science tasks with Python Beautiful Soup! (movie dataset creation)Full Data Science Mock Interview! (featuring Kylie Ying)Complete Python NumPy Tutorial (Creating Arrays, Indexing, Math, Statistics, Reshaping)3 Insider Tips to Stay Ahead in Programming!Comprehensive Python Beautiful Soup Web Scraping Tutorial! (find/find_all, css select, scrape table)Winning at Connect 4 for an Hour Straight!Creating Analytics Dashboards, Websites, Slideshows and more with Python! | Quarto Crash CourseHow to Make a High Quality Tutorial Video! (workflow, camera equipment, and software tools)Complete Natural Language Processing (NLP) Tutorial in Python! (with examples)Real-World Python Machine Learning Tutorial w/ Scikit Learn (sklearn basics, NLP, classifiers, etc)Dynamic Programming Example - Fibonacci
Keith Galli |

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

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER