Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Web Scraping with Python

You're reading from   Hands-On Web Scraping with Python Perform advanced scraping operations using various Python libraries and tools such as Selenium, Regex, and others

Arrow left icon
Product type Paperback
Published in Jul 2019
Publisher Packt
ISBN-13 9781789533392
Length 350 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Anish Chapagain Anish Chapagain
Author Profile Icon Anish Chapagain
Anish Chapagain
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Section 1: Introduction to Web Scraping FREE CHAPTER
2. Web Scraping Fundamentals 3. Section 2: Beginning Web Scraping
4. Python and the Web – Using urllib and Requests 5. Using LXML, XPath, and CSS Selectors 6. Scraping Using pyquery – a Python Library 7. Web Scraping Using Scrapy and Beautiful Soup 8. Section 3: Advanced Concepts
9. Working with Secure Web 10. Data Extraction Using Web-Based APIs 11. Using Selenium to Scrape the Web 12. Using Regex to Extract Data 13. Section 4: Conclusion
14. Next Steps 15. Other Books You May Enjoy

Using Regex to Extract Data

If these libraries don't exist in your current Python setup, refer to Chapter 2, Python and the Web – Using urllib and Requests, the Setting things up section, for more information on their installation and how to set them up. So far, we have learned about web technologies, data finding techniques, and how to access web content using Python libraries.

Regular Expressions (Regex or regex) is actually a pattern that's built using predefined commands and formats to match the desired content. Regex provides a great value during data extraction when there is no particular layout or markup patterns to be chosen and can be applied with other techniques such as XPath, and CSS selectors.

Complex web content and data in general text or character format might require the use of Regex to complete activities, such as matching and extraction, plus...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime