{"id":6099,"date":"2023-10-18T14:47:43","date_gmt":"2023-10-18T14:47:43","guid":{"rendered":"https:\/\/royadata.io\/blog\/?p=6099"},"modified":"2023-10-18T14:47:43","modified_gmt":"2023-10-18T14:47:43","slug":"web-scraping-javascript-tutorials","status":"publish","type":"post","link":"http:\/\/royadata.io\/blog\/web-scraping-javascript-tutorials\/","title":{"rendered":"How to scrape HTML from a website Using Javascript?"},"content":{"rendered":"<blockquote>\n<p>Do you plan to scrape websites using JavaScript? With the help of the Node.js platform and its associated libraries, you can use JavaScript to develop web scrapers that can scrape data from any website you like.<\/p>\n<\/blockquote>\n<p><picture class=\"aligncenter size-full wp-image-6073 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-300x167.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-768x426.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20555'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20555'%3E%3C\/svg%3E\" alt=\"web scraping with javascript\" width=\"1000\" height=\"555\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-300x167.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-768x426.jpg 768w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-6073\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-300x167.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-768x426.jpg.webp 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg\" alt=\"web scraping with javascript\" width=\"1000\" height=\"555\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-300x167.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/web-scraping-with-javascript-768x426.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>We are in an era where businesses depend largely on data, and the Internet is a huge source of data with textual data being the most important. Social and business researchers are interested in <a href=\"https:\/\/royadata.io\/blog\/how-to-collect-big-data\/\">collecting data<\/a> from websites that have data of interest to them.<\/p>\n<p>Unfortunately, most websites do not make it easy for data scientists to collect the required data. For this reason, researchers have to use automated means to collect these data on their own. This automated means of collecting publicly accessible data on web pages using <a href=\"https:\/\/royadata.io\/blog\/web-scraping-tools\/\">web scrapers<\/a> is known as web scraping.<\/p>\n<p>Read more, <a href=\"https:\/\/royadata.io\/blog\/web-scraping\/\">What is Web Scraping and Is it Legal?<\/a><\/p>\n<p>Web scrapers can be developed using any programming language that is Turing complete. Java, PHP, Python, JavaScript, C\/C++, and C#, among others, have been used for writing web scrapers. Being that as it may, some languages are much more popular than others as far as developing web scrapers are concerned.<\/p>\n<p>JavaScript is not a popular choice. In recent times, its popularity as a language for developing web scrapers is on the rise \u2013 thanks to the availability of web scraping libraries. In this article, I will be showing you how to develop web scrapers using JavaScript.<\/p>\n<hr\/>\n<h2 id=\"node-js-the-game-changer\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Nodejs_%E2%80%93_The_Game_Changer\"><\/span><strong>Node.js \u2013 The Game Changer<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>JavaScript was originally developed for frontend web development to add interactivity and responsiveness to web pages. Outside of a browser, JavaScript cannot run. For this reason, you cannot use it for backend development as you can use the likes of <a href=\"https:\/\/royadata.io\/blog\/web-scraping-with-python\/\">Python<\/a>, Java, and C++.\u00a0 This then means that you will need to be proficient in two languages to be able to do both frontend and backend development. However, Developers thought that JavaScript is a complete programming language and, as such, shouldn\u2019t be confined to only the browser environment.<\/p>\n<p><picture class=\"aligncenter size-full wp-image-6071 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-300x158.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-768x403.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20525'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20525'%3E%3C\/svg%3E\" alt=\"Nodejs\" width=\"1000\" height=\"525\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-300x158.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-768x403.jpg 768w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-6071\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-300x158.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-768x403.jpg.webp 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg\" alt=\"Nodejs\" width=\"1000\" height=\"525\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-300x158.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Nodejs-768x403.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>This led Ryan Dahl to develop Node.js. Node.js is a JavaScript runtime environment built on Chrome\u2019s V8 JavaScript Engine. With Node.js, you can write codes and get them to run on PCs and servers, just like PHP, Java, and Python.<\/p>\n<p>This now made many developers take JavaScript as a complete language to be taken seriously \u2013 and many libraries and frameworks were developed for it to make programming backend using JavaScript easily. With Node.js, you can now use one language to write codes for both frontend and backend.<\/p>\n<p>As a JavaScript developer, you can develop a complete web scraper using JavaScript, and you will use Node.js to run it. I will show you how to code a web scraper using JavaScript and some Node.js libraries.<\/p>\n<hr\/>\n<h2 id=\"installations-and-setup\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Installations_and_Setup\"><\/span><strong>Installations and Setup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><picture class=\"aligncenter size-full wp-image-6068 perfmatters-lazy\" loading=\"lazy\"><source type=\"image\/webp\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-300x152.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-768x390.jpg.webp 768w\" srcset=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20508'%3E%3C\/svg%3E\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns='http:\/\/www.w3.org\/2000\/svg'%20viewBox='0%200%201000%20508'%3E%3C\/svg%3E\" alt=\"Node.js libraries\" width=\"1000\" height=\"508\" data-src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg\" data-srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-300x152.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-768x390.jpg 768w\" data-sizes=\"(max-width: 1000px) 100vw, 1000px\" loading=\"lazy\" \/>\n<\/picture>\n<noscript><picture class=\"aligncenter size-full wp-image-6068\"><source type=\"image\/webp\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg.webp 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-300x152.jpg.webp 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-768x390.jpg.webp 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg\" alt=\"Node.js libraries\" width=\"1000\" height=\"508\" srcset=\"https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries.jpg 1000w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-300x152.jpg 300w, https:\/\/royadata.io\/blog\/wp-content\/uploads\/2023\/10\/Node.js-libraries-768x390.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\"\/>\n<\/picture>\n<\/noscript><\/p>\n<p>Unlike the JavaScript runtime that comes installed in every modern browser, you will need to install Node.js for you to use it for your development. You can install Node.js from <a href=\"https:\/\/nodejs.org\/en\/\"  rel=\"noopener noreferrer\">the Node.js official website<\/a> \u2013 file size is less than 20MB for Windows users. After installing Node.js, you can enter the below code in your command line to see if it has been installed successfully.<\/p>\n<pre><strong>Node<\/strong><\/pre>\n<p>if no error message is returned, then Node has been installed successfully. You can also confirm by looking out for the Node.js application in your list of installed programs. After installation, the next step is to install the necessary libraries\/modules for web scraping.<\/p>\n<p>For this tutorial, I will advise you to create a new folder in your desktop and name it web scraping. Then launch Command Prompt (MS-DOS\/ command line) and navigate to the folder using the command below.<\/p>\n<pre><strong>cd desktop\/web scraper<\/strong><\/pre>\n<p>Now, let start installing the Node.js packages for web scraper \u2013 don\u2019t close Command Prompt yet.<\/p>\n<ul>\n<li>\n<h3 id=\"axios\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Axios\"><\/span><strong>Axios<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p>The Axios module is one of the most important web scraping libraries. It is an HTTP Client, just like a browser that sends web requests and gets back a response for you. You will be using it to download pages you want to scrape data from. To installAxios, use the code below.<\/p>\n<pre><strong>npm install axios<\/strong><\/pre>\n<ul>\n<li>\n<h3 id=\"cheerio\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Cheerio\"><\/span><strong>Cheerio<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p>Cheerio is a lightweight library you can use to transverse the DOM of the HTML page downloaded using Axios for the purpose of collecting the required data. Its syntax is like that of jQuery, and as such, you will have no problem using it if you already know how to make use of jQuery. Use the below command to install it.<\/p>\n<pre><strong>npm install request<\/strong><\/pre>\n<ul>\n<li>\n<h3 id=\"puppeteer\" class=\"ftwp-heading\"><span class=\"ez-toc-section\" id=\"Puppeteer\"><\/span><strong>Puppeteer<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<\/li>\n<\/ul>\n<p>If you are scraping from static pages, the libraries above will do the work. However, when you intend to scrape from pages that its contents are dynamically generated and depend on JavaScript evens to load, then Axios isn\u2019t useful as it only downloads what the server sends to it when it initials a request.\u00a0 For dynamic websites that depend on JavaScript events to load content, you will need a browser automation tool to help you control a browser so that all contents will load,and then you can scrape them.<\/p>\n<pre><strong>npm install puppeteer<\/strong><\/pre>\n<p>Related,<\/p>\n<ul>\n<li><a href=\"https:\/\/royadata.io\/blog\/use-chrome-headless-and-dedicated-proxies-to-scrape-any-website\/\">Use Chrome Headless and Dedicated Proxies to Scrape Any Website<\/a><\/li>\n<li><a href=\"https:\/\/www.stupidproxy.com\/puppeteer-proxies\/\">Proxies for Puppeteer while scraping to prevent getting blocked!<\/a><\/li>\n<\/ul>\n<hr\/>\n<h2 id=\"scraping-from-static-websites\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Scraping_from_Static_Websites\"><\/span><strong>Scraping from Static Websites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Scraping from static web pages is the easiest \u2013 when we are not putting anti-scraping systems into consideration. This is because, for static web pages, all that is required is for you to use an HTTP Client (Axios) to request for the content of a page, the website\u2019s server will send back a response as HTML.<\/p>\n<p>You can then make use of Cheerio to transverse the DOM and scrape the required data. In the example below, I use JavaScript to scrape the text within the h1 tag from <a href=\"https:\/\/example.com\/\"  rel=\"noopener noreferrer\">https:\/\/example.com\/<\/a>. In the code below, I use Axiosto download the whole page and then Cheerio for collecting traversing the DOM and scraping the text within the h1 tag.<\/p>\n<pre>constaxios = require(\"axios\")\n\n\n\nconst cheerio = require(\"cheerio\")\n\n\n\nasync function fetchHTML(url) {\n\n\n\nconst{ data } = await axios.get(url)\n\n\n\n\u00a0 return cheerio.load(data)\n\n\n\n}\n\n\n\nconst $ = await fetchHTML(\"https:\/\/example.com\")\n\n\n\n\/\/ Print the full HTML\n\n\n\nconsole.log(`Site HTML: ${$.html()}\\n\\n`)\n\n\n\n\/\/ Print some specific page content\n\n\n\nconsole.log(`First h1 tag: ${$('h1').text()}`)<\/pre>\n<hr\/>\n<h2 id=\"scraping-dynamic-websites\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Scraping_Dynamic_Websites\"><\/span><strong>Scraping Dynamic Websites<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Dynamic websites pose a serious challenge to web scraper. Websites on the Internet were initially developed as static websites with little to no form of interactivity. For these websites, when you send a request for a page, all the content for that page is loaded at ones \u2013 this is the model that is easiest for web scrapers to scrape.<\/p>\n<p>However, with the advent of dynamic websites, many pages on the Internet do not get their content loaded at ones. Some of the content depends on JavaScript events. If you are posed with scraping a website like this, you will need to use Puppeteer.<\/p>\n<p>What Puppeteer does is that it controls Chrome to visit the website, trigger the JavaScript events that will load content, and then when content is loaded, you can then scrape the required data out. There is a lot you can do with Puppeteer. In the below example, the code scrapes the title and summary of <a href=\"https:\/\/www.imdb.com\/title\/tt1596343\/\"  rel=\"noopener noreferrer\">the Fast Five movies from IMDb<\/a>. There is more you can do with Puppeteer; <a href=\"https:\/\/devdocs.io\/puppeteer\/\"  rel=\"noopener noreferrer\">read the Puppeteer documentation here<\/a> to learn more about its APIs and usage.<\/p>\n<pre>const puppeteer = require(\"puppeteer\");\n\n\n\nasync function collectData() {\n\n\n\nconst browser = await puppeteer.launch();\n\n\n\nconst page = await browser.newPage();\n\n\n\n\u00a0 await page.goto\n\n\n\n(\"https:\/\/www.imdb.com\/title\/tt1013752\/\");\n\n\n\nconst data = await page.evaluate(() => {\n\n\n\nconst title = document.querySelector(\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"#title-overview-widget >div.vital>\n\n\n\ndiv.title_block> div >div.titleBar>\n\n\n\ndiv.title_wrapper> h1\"\n\n\n\n).innerText;\n\n\n\nconst summary = document.querySelector(\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 \"#title-overview-widget >\n\n\n\ndiv.plot_summary_wrapper>div.plot_summary>\n\n\n\ndiv.summary_text\"\n\n\n\n).innerText;\n\n\n\n\u00a0\u00a0\u00a0 \/\/ This object will be stored in the data variable\n\n\n\n\u00a0\u00a0\u00a0 return {\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 title,\n\n\n\n\u00a0\u00a0\u00a0\u00a0\u00a0 summary,\n\n\n\n\u00a0\u00a0\u00a0 };\n\n\n\n\u00a0 });\n\n\n\n\u00a0 await browser.close();\n\n\n\n}\n\n\n\ncollectData();<\/pre>\n<hr\/>\n<h2 id=\"a-note-about-anti-scraping-techniques\" class=\"ftwp-heading\" style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"A_Note_About_Anti-Scraping_Techniques\"><\/span><strong>A Note About Anti-Scraping Techniques<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Looking at the codes above, I didn\u2019t incorporate techniques to bypass anti-bot systems. This is because the tutorial is minimalistic and a proof of concept.<\/p>\n<p>In reality, if you develop your own web scrapers and do not put into consideration anti-scraper systems, your bot will be blocked after a few hundred requests. This is because websites do not want to be scrapped as it adds no value to them \u2013 instead, it adds to their running cost. For this reason, they put in place anti-scraping systems to discourage web scraping and other forms of automated access.<\/p>\n<p>The most popular anti-scraping techniques used by websites include IP tracking and block, and Captcha systems. Some websites use cookies, local storage, and browser fingerprinting to prevent bot traffic too.<\/p>\n<p>So, I will advise you to <a href=\"https:\/\/www.npmjs.com\/package\/axios\"  rel=\"noopener noreferrer\">read the Axion documentation<\/a> in order to learn how to use proxies, change user-agent string, and other headers, as well as rotate them.For a more comprehensive article on how to evade blocks, read our article \u2013 <a href=\"https:\/\/royadata.io\/blog\/scrape-a-website-never-get-blacklisted\/\"  rel=\"noopener noreferrer\">How to Scrape Websites and Never Get Blocked<\/a>.<\/p>\n<pre style=\"text-align: center;\"><strong>Conclusion<\/strong><\/pre>\n<p>With the development of Node.js, it is time for everyone that has looked down on JavaScript to know that JavaScript is like every other programming language.<\/p>\n<p>Unlike in the past, you can now develop web scraper in JavaScript that requires no browser to run \u2013 it will run on a server or your local PC with the help of Node. Node goes crape any website you like with the help of\u00a0 JavaScript, Node.js, <a href=\"https:\/\/royadata.io\/blog\/different-types-of-proxies\/\">proxies<\/a>, and anti-Captcha systems.<\/p>\n<hr\/>\n<p>Related,<\/p>\n<ul>\n<li><a href=\"https:\/\/royadata.io\/blog\/seo-proxies\/\">Scraping Search Engines without Block and Captchas!<\/a><\/li>\n<li><a href=\"https:\/\/royadata.io\/blog\/proxies-for-scraping-google\/\">Proxies for Preventing Bans and Captchas When Scraping Google<\/a><\/li>\n<li><a href=\"https:\/\/royadata.io\/blog\/best-captcha-breaking-service-with-proxies\/\">What is The Best Service for Captcha Breaking with Proxies?<\/a><\/li>\n<li><a href=\"https:\/\/royadata.io\/blog\/python-web-scraper-tutorial\/\">How to Build a Simple Web Scraper with Python<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Do you plan to scrape websites using JavaScript? With the help of the Node.js platform and its associated libraries, you can use JavaScript to develop web scrapers that can scrape data from any website you like. We are in an era where businesses depend largely on data, and the Internet is a huge source of &#8230; <a title=\"How to scrape HTML from a website Using Javascript?\" class=\"read-more\" href=\"http:\/\/royadata.io\/blog\/web-scraping-javascript-tutorials\/\" aria-label=\"More on How to scrape HTML from a website Using Javascript?\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/6099"}],"collection":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/comments?post=6099"}],"version-history":[{"count":0,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/posts\/6099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media\/286"}],"wp:attachment":[{"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/media?parent=6099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/categories?post=6099"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/royadata.io\/blog\/wp-json\/wp\/v2\/tags?post=6099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}