
Set up your web scraping workflow by installing Visual Studio Code and NodeJS, then use npm or yarn to install packages and run your scripts.
Feel free to watch this later in the course if you wonder what the deprecation of the request/request-promise packages means to you
Always check for a public API before web scraping, then use a request to fetch JSON data; only resort to automated browsers like Puppeteer as a last option.
Learn to select elements on a webpage to scrape data, using simple HTML element selection. If you know jQuery and CSS selectors, you can skip ahead; otherwise follow along.
Use Chrome developer tools to inspect HTML elements, identify tags and attributes, and extract text and href values for web scraping.
Learn to select page elements for web scraping using vanilla JavaScript with document.querySelector and textContent, then switch to jQuery selectors ($, .text) for easier extraction, including injecting jQuery when absent.
Set up a server-side web scraper with node and npm, install request, request promise, and cheerio, fetch a page, save HTML, and extract text with cheerio for data handling.
Select multiple h2 elements with jQuery in the browser and with Cheerio in NodeJS, then loop with .each to print text. Save results to MongoDB or CSV.
Discover how to select elements with css selectors in jQuery for a NodeJS web scraper, using id with a hashtag and class selectors.
Explore how unique ids versus reusable classes in HTML and CSS influence selection in jQuery, using dot class selectors to target multiple elements and combine with element selectors.
Learn to select elements using HTML attributes in jQuery, including targeting a specific attribute value like data customer and selecting all elements with the attribute. Apply this to Craigslist.
Learn to scrape data from a table with Node.js request and cheerio, converting it into a JavaScript data structure, while understanding HTML table anatomy and crafting selectors in Chrome tools.
Learn the basic HTML structure of HTML tables, so you can better understand how to scrape data from them
See our end goal of the scraped data, the data structure of our scraped data from the HTML table using Request/Cheerio
Learn how to easily copy a selector in Chrome tools, so you can select the data you need from the HTML table with jQuery.
Extract all table rows and data cells by removing nth-child selectors and printing each cell's text with a jQuery each loop, then move to scraping with node.js.
Learn to scrape table data in Node.js using Cheerio and request-promise, set up with npm or yarn, write an async main function, and expose scraped results via an API.
Learn to extract company names from a table in node.js by iterating rows and mapping first data cell to the company, second to the contact, third to the country.
Scrape all table columns in NodeJS by extracting company, contact, and country into a scraped rows array, then deploy a periodic scraper saving data to MongoDB or CSV.
Learn to build a dynamic Node.js web scraper that derives object properties from table headers and maps table cells to those properties, handling tables with varying columns.
Initiate the Praxis Scraper project to collect all job titles, URLs, and descriptions from every page, using cheerio for selectors and axios for HTTP requests.
Learn how to fetch HTML with Axios in node.js, parse it with cheerio, and prepare to extract job titles from a Craigslist page using async JavaScript.
Learn how to extract data from a site using css selectors and jquery injection, identify job title elements, inspect html, inject jquery, and print titles one by one in nodejs.
Learn to print job titles one by one using a cheerio-based each loop in nodejs, extract text, and prepare a separate job object with the title and the url.
Learn to extract all job URLs from a shop listing using css selectors and jquery, retrieving href attributes with .each, and testing in Chrome before Node.js output.
Learn to extract job titles and URLs from a webpage using nodejs and cheerio, converting results into objects with map and get, and extend to scrape all pages.
Scrape job descriptions by fetching HTML from job pages using Axios, parse with cheerio, and assemble a unified data object with titles, URLs, and descriptions.
Save each job description to job.description and map to return all jobs with descriptions using Promise.all; avoid blocking by scraping not so aggressively, as shown in the next section.
Learn how to avoid getting banned while web scraping by using a safe mock proxy, comparing sequential requests to parallel, and implementing a for loop to wait for each promise.
Learn to scrape static websites with pagination in nodejs and javascript by inserting sleep between requests to mimic human browsing and avoid bans, with puppeteer for dynamic pages.
Master puppeteer to scrape Craigslist San Francisco Bay Area jobs, extracting descriptions and compensation, then save to MongoDB via MLab, with scraping limits.
Switch from node js request to puppeteer to bypass blocking when scraping craigslist, using an automated chromium browser, while limiting requests to prevent ip bans.
Create a Craigslist web scraper project folder, navigate into it, and initialize with npm init; install puppeteer and cheerio, noting puppeteer downloads a full chromium browser.
In this lecture we'll learn how to open any given URL with Puppeteer and the Chromium browser.
Identify the specific data to scrape from Craigslist job listings, including posted date, title, neighborhood, job description content, compensation, and the job URL; handle missing fields gracefully.
Examine the data structure for scraped job data in Node.js, modeled as an array of objects with title, date posted, neighborhood, url, description, and compensation, stored in MongoDB.
Test the job title css selector in Chrome developer tools to identify the element with class 'result title', then iterate and extract text for scraping in NodeJS.
Write Node.js scraping code using Puppeteer and Cheerio to fetch page HTML and extract job titles, with plans to capture posted date and job description URL.
Learn to extract job description URLs from listings by selecting link elements and using the href attribute, then structure data as objects with title and URL in NodeJS for MongoDB.
Create an array of scraping objects using a single map loop to extract title and url, test in the browser console, then run and validate results in Node.js.
Learn to extract neighborhood data from listings and clean it by trimming whitespace and replacing noise with JavaScript functions, preparing clean data for subsequent scraping steps.
Build a Puppeteer workflow to loop through listing urls, visit pages serially, and scrape job descriptions, with a main function and rate limiting to prevent blocking.
Learn to rate-limit node web scraping with a generic sleep function using async/await and setTimeout, pausing between Craigslist requests, then extract job description text in the next steps.
Learn to extract job description text from multiple pages by selecting the posting body id with Cheerio, load HTML, and attach descriptions to listings while spacing requests to avoid blocking.
Setting up a MongoDB database is fast, easy and free with MLab!
Define a Mongoose listing schema with title, date posted, neighborhood, URL, job description, and compensation, enabling validation, then create and export a listing model for use in index.js.
Learn how to handle blocks in web scraping with Cloud9 or Glitch, proxies in Node.js requests, and preventive scraper techniques to avoid bans.
Configure a proxy in Node.js request by setting defaults with proxy, explore free and paid proxies, diagnose common errors like host unreachable, and avoid blocking with throttled scraping.
Initialize a node project, install cheerio, request, request-promise, and chest, and set up a testable scraper that minimizes site requests to reduce bans.
Create a __tests__ folder using the jest convention and add a test script in package.json to run with watch mode, enabling live test updates while editing.
Master test driven development in nodejs by writing tests first for a parser used in web scraping, then implement code until tests pass, using yarn test.
Write the add function that accepts two numbers and returns their sum, then observe the test pass as the test runner automatically runs on save.
Learn to read an html file for tests and separate parsing logic from data extraction using test driven development with a html getter and a parser.
Write and validate a listings parser in Node.js, extracting title, URL, date, and neighborhood from HTML, and test data integrity and counts with focused before all setup and per-field tests.
Build a parser that uses Cheerio and jQuery to extract listing titles from the result info element and return a listings array to pass tests.
Extract a page URL by selecting the title element, reading its text, and retrieving the href attribute in a Node.js and JavaScript web scraping workflow.
Locate the neighborhood element inside the result info container, extract its text with find and text, trim whitespace, and fix the tests so all tests pass.
Apply test-driven development to build a Craigslist scraper that runs tests offline, refactor with small get-date-posted and get-hood functions, and schedule periodic runs to maintain code quality.
Export scraper results by converting an array of objects to a csv file with the objects to csv package and writing it to disk, then validate readability in Google Sheets.
Learn to handle bad network connectivity in a craigslist scraper using request retry in Node.js, return html strings, and tune retry limits and delays.
In this course you will learn how to scrape a websites, with practical examples on real websites using JavaScript Nodejs Request, Cheerio, NightmareJs and Puppeteer. You will be using the newest JavaScript ES7 syntax with async/await.
You will learn how to scrape a Craigslist website for software engineering jobs, using Nodejs Request and Cheerio. You will be using the newest JavaScript ES7 syntax with async/await.
You will then learn how to scrape more advanced websites that require JavaScript such as iMDB and AirBnB using NighmareJs and Puppeteer.
I'm gong to also show you with a practical real-life website, how you can even avoid wasting time on creating a web scraper in the first place, by reverse engineering websites and finding their hidden API's!
Learn how to avoid being blocked from websites when developing out your scraper, by building out the scraper in a test-driven way with mocked html, rather than hitting the website every time as you're debugging and developing it. You'll also learn what you can do if you're blocked and your alternatives to get your scraper up and running regardless!
You will also learn how to scrape on a server with a bad connection, or even if you have a bad connection.
You'll even learn how to save your results to a CSV file and MongoDB!
How do you build a scraper that scrapes every 1 hour (or other interval), and deploy it do a cloud host like Heroku or Google Cloud? Let me show you, quick and easy!
How do you scrape a site requiring passwords? I'm going to show you that too with a real website (Craigslist)!
How do you serve your scraping results in a REST API with Nodejs Express? And how can we build a React frontend that's showing the results? You'll learn that too, in the quickest and simplest way possible!
Plus, a section covering how to make a basic GraphQL API is included in the course.
As a last cherry on the top, I have a section containing a secret backdoor showing you how to scrape Facebook using only Request!
If you have issues regarding a site you're trying to scrape yourself, it's totally okay to reach out to me for some help. I'd be happy to point you in the right direction! Whatever issues my students are facing, I use that to expand on my course!