Goal: Explore and apply web scraping techniques to extract structured data from various websites.
This lab focused on the fundamentals and practical aspects of web scraping. The main objective was to automate the extraction of useful information such as: Titles Images Ratings and reviews We used HTML selectors and CSS classes to accurately locate and extract relevant elements from web pages.
The scraping process followed these key steps: Sending HTTP requests to target websites using Python libraries (e.g., requests) Receiving and parsing HTML content using tools such as BeautifulSoup Identifying elements of interest using HTML tags, class names, and other attributes Extracting and cleaning the data for further analysis Saving the data in a structured format, such as CSV
HTML Structure Analysis: Understanding how websites are built using HTML and CSS is crucial for identifying the correct elements to scrape. Data Extraction Techniques: Learned how to work with tag-based selectors (div, span, img, etc.) and class-based selectors to navigate and extract data. Automation and Efficiency: Web scraping allows automating repetitive data collection tasks across multiple pages or websites. Data Storage: Practiced saving the extracted data in CSV format for later use in data analysis or visualization tasks.
Web scraping is a powerful technique for collecting structured data from the web. It involves sending HTTP requests, parsing the returned HTML content, and extracting relevant information based on predefined rules. Through this project, practical skills in working with real-world web data were developed, alongside a better understanding of how modern websites serve and structure content.