In this tutorial we learn about HTML Scraping. Websites are written using HTML, which means each web page is a structured document. Sometimes, it would be great to obtain some data from them and preserve the structure while we’re at it.
There are 3 types of HTML Scraping, which is declared the method of how to extract data through HTML.
- Using Chrome Extension
- Using Manual Selector
- Using Chrome Developer Mode
Using Chrome Extension
-
Go to Html source URL or Web Page
-
Now using extension we can create new field by click on
New
tab -
Click on CSS selector and then a click on the web page field which you want to extract
, -
Now save this scraping agent and get these data in managed form of table as given in screenshot below :
,
Using Manual Selector
-
Go to HTML source URL or Web Page
-
Now using extension we can create new field by click on
New
tab -
We write the CSS selector manually by the help of the html code of this web page
, -
Now save this scraping agent then we can show these data in managed form of table given in screenshot where field name is
,Product\_Name
Using Chrome Developer Mode
-
Go to Html source URL or Web Page
-
Now using extension we can create new field by click on
New
tab -
We write the CSS selector using
Chrome developer
-
Right click on the text which you want to select (like as Product A) and to generate the “CSS Selector” and inspect it
,
-
And go to the Copy and Copy Selector for the particular field, and we need to make a selector to extract all field
,
Final Result
Now we got the selector which is working for all field that are extracted is given in screenshot.
,