Packt
Web Scraping Tutorial with Scrapy and Python for Beginners
Packt

Web Scraping Tutorial with Scrapy and Python for Beginners

包含在 Coursera Plus

深入了解一个主题并学习基础知识。
初级 等级

推荐体验

2 周 完成
在 10 小时 一周
灵活的计划
自行安排学习进度
深入了解一个主题并学习基础知识。
初级 等级

推荐体验

2 周 完成
在 10 小时 一周
灵活的计划
自行安排学习进度

您将学到什么

  • Identify and describe the key components of Scrapy and web scraping concepts.

  • Explain how CSS selectors, XPath, and API calls work in extracting web data.

  • Implement web scraping techniques to extract data from static and dynamic websites using Scrapy.

  • Distinguish between different web scraping methods and choose the most suitable for various scenarios.

要了解的详细信息

可分享的证书

添加到您的领英档案

作业

10 项作业

授课语言:英语(English)

了解顶级公司的员工如何掌握热门技能

Petrobras, TATA, Danone, Capgemini, P&G 和 L'Oreal 的徽标

该课程共有22个模块

In this module, we will introduce you to the fundamental concept of web scraping, how it works, and how the Scrapy framework can help extract data from websites. You’ll gain a clear understanding of the basic terminology and workflow involved in this process.

涵盖的内容

3个视频1篇阅读材料

In this module, we will guide you through the installation of Scrapy on both Windows and Ubuntu systems. You'll learn how to create your first Scrapy project and familiarize yourself with its structure through a detailed project walkthrough.

涵盖的内容

4个视频1个插件

In this module, we will walk you through the process of creating a Scrapy spider, sending requests, and receiving responses. We will also cover how to use CSS selectors to extract data, giving you the skills to build and refine your spider.

涵盖的内容

7个视频1个作业1个插件

In this module, we will explore the use of CSS selectors to locate web elements efficiently. You’ll learn how to use basic and attribute-based selectors to extract data from web pages, comparing their strengths with XPath.

涵盖的内容

3个视频1个插件

In this module, we will dive into the power of XPath for web scraping. You'll learn how to write XPath expressions, use attribute selectors, and leverage the text() function to extract data efficiently from web elements.

涵盖的内容

3个视频1个插件

In this module, we will introduce the Scrapy Shell, a powerful interactive tool for testing and debugging web scraping tasks. You'll practice fetching responses and configuring the shell to fit different scraping scenarios.

涵盖的内容

3个视频1个作业1个插件

In this module, we will focus on using Scrapy items to organize the data you scrape. You'll learn how to define fields, process input and output data, and work with ItemLoaders to simplify the handling of complex data.

涵盖的内容

5个视频1个插件

In this module, we will explore how to export data extracted using Scrapy into various formats like JSON, CSV, and XML. You’ll also learn techniques to overwrite or append data, making the export process more flexible.

涵盖的内容

3个视频1个插件

In this module, we will cover how to use item pipelines to process and store scraped data efficiently. You’ll learn to save data locally or in MongoDB, ensuring that your scraping workflows are scalable and well-organized.

涵盖的内容

5个视频1个作业1个插件

In this module, we will demonstrate how to handle pagination by extracting links from web pages and sending requests to retrieve additional data. You’ll also learn how to automate the process with the start_requests() method.

涵盖的内容

3个视频1个插件

In this module, we will show you how to follow links in Scrapy spiders, select data using regular expressions, and set up custom callback functions to handle more complex scraping tasks, such as navigating between product pages.

涵盖的内容

4个视频1个插件

In this module, we will teach you how to scrape data from HTML tables. You will learn the techniques to select table rows, cells, and handle complex table structures to ensure accurate data extraction.

涵盖的内容

3个视频1个作业1个插件

In this module, we will focus on scraping data from websites that require login credentials. You'll learn how to inspect forms, log in using Scrapy's FormRequest, and work with CSRF protection to bypass security restrictions.

涵盖的内容

5个视频1个插件

In this module, we will explore scraping JavaScript-rendered websites using Scrapy and Playwright. You’ll learn how to install and configure Playwright, render dynamic web pages, and extract data from these types of websites.

涵盖的内容

5个视频1个插件

In this module, we will explore Playwright’s advanced features in combination with Scrapy. You will learn how to handle dynamic websites, including those with infinite scrolling and loading screens, while collecting data.

涵盖的内容

8个视频1个作业1个插件

In this module, we will teach you how to identify and interact with API endpoints, enabling you to bypass scraping web pages and directly request structured data from the API for more efficient data collection.

涵盖的内容

3个视频1个插件

In this module, we will cover the settings that affect your entire Scrapy project, including handling robots.txt files, configuring middleware, and optimizing your scraping speed using the Autothrottle extension.

涵盖的内容

4个视频1个插件

In this module, we will explain how to use user agents and proxies to avoid being blocked while scraping. You will learn how to rotate these configurations dynamically to maintain efficient data collection.

涵盖的内容

4个视频1个作业1个插件

In this module, we will share practical tips and tricks to enhance your scraping experience. You will learn about customizing spiders, running standalone spiders, and advanced methods for extracting and manipulating data.

涵盖的内容

5个视频1个插件

In this project module, we will guide you through scraping sports data from ESPN.com. You will build a Scrapy spider, inspect the website, and extract key information such as teams, rankings, and match details.

涵盖的内容

5个视频1个作业1个插件

In this project module, we will focus on scraping product rankings from Amazon. You’ll learn how to locate selectors, structure your data, and build a complete spider to automate the extraction process.

涵盖的内容

4个视频1个插件

In this project module, we will demonstrate how to extend your scraper by building a graphical user interface (GUI). You will learn how to set up the interface and trigger spiders directly from the application.

涵盖的内容

3个视频3个作业

位教师

Packt - Course Instructors
Packt
971 门课程234,954 名学生

提供方

Packt

从 Software Development 浏览更多内容

人们为什么选择 Coursera 来帮助自己实现职业发展

Felipe M.
自 2018开始学习的学生
''能够按照自己的速度和节奏学习课程是一次很棒的经历。只要符合自己的时间表和心情,我就可以学习。'
Jennifer J.
自 2020开始学习的学生
''我直接将从课程中学到的概念和技能应用到一个令人兴奋的新工作项目中。'
Larry W.
自 2021开始学习的学生
''如果我的大学不提供我需要的主题课程,Coursera 便是最好的去处之一。'
Chaitanya A.
''学习不仅仅是在工作中做的更好:它远不止于此。Coursera 让我无限制地学习。'
Coursera Plus

通过 Coursera Plus 开启新生涯

无限制访问 10,000+ 世界一流的课程、实践项目和就业就绪证书课程 - 所有这些都包含在您的订阅中

通过在线学位推动您的职业生涯

获取世界一流大学的学位 - 100% 在线

加入超过 3400 家选择 Coursera for Business 的全球公司

提升员工的技能,使其在数字经济中脱颖而出

常见问题