- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
- Python Advanced Tutorial
- Python - Classes/Objects
- Python - Reg Expressions
- Python - CGI Programming
- Python - Database Access
- Python - Networking
- Python - Sending Email
- Python - Multithreading
- Python - XML Processing
- Python - GUI Programming
- Python - Further Extensions
Python Implementing web scraping using lxml
In this article, we will learn about web scraping technique using lxml module available in Python.
What is web scraping?
Web scraping is used to obtain/get the data from a website by the help of a crawler/scanner. Web scrapping comes handy to extract the data from a web page that doesn't offer the functionality of an API. In python, web scrappping can be done by the help of various modules namely Beautiful Soup, Scrappy & lxml.
Here we will discuss web scrapping using the lxml module.
For that, we first need to install lxml .
Type in the terminal or command prompt −
>>> pip install lxml
Here xpath is used to access the data .
In this article we will extract data from the website known as steam containing informations about different games.
On the page, we will try to extract information from the popular new releases section.
Here we will extract names , prices , tags associated & target platform .
On the page see the html code of new releases tab by using inspect element feature in the chrome . Here we will get to know that which tag is storing the required information.
Here in this website ; every list element is encapslated in a div tag id=tab_content which is further encapsualted in
a div tag id=tab_select_newreleases
Now let's see the implementation
- Related Articles
- Implementing web scraping using lxml in Python?
- Implementing web scraping using lxml in Python Programming
- Python Implementing Web Scraping with Scrapy
- Implementing Web Scraping in Python with BeautifulSoup?
- Implementing Web Scraping in Python with Scrapy
- Web Scraping using Python and Scrapy?
- Python Tools for Web scraping
- Web Scraping in Android Application using Kotlin?
- Why is Python the Best Language for Web Scraping?
- Selenium versus BeautifulSoup for Web Scraping.
- html5lib and lxml parsers in Python
- Downloading files from web using Python?
- Error detection at its best: Implementing Checksum using Python
- Python module Newspaper for Article scraping & curation?
- OpenCV Python – Implementing feature matching between two images using SIFT