Giter Site home page Giter Site logo

makescraper's Introduction

๐Ÿ•ท makescraper

Go Report Card

Create your very own web scraper and crawler using Go and Colly Chromedp ๐Ÿ˜

๐Ÿ“š Table of Contents

  1. Project Structure
  2. Getting Started
  3. Deliverables
  4. Resources

Project Structure

๐Ÿ“‚ makescraper
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ scrape.go

Getting Started

  1. Visit github.com/new and create a new repository named makescraper.

  2. Run each command line-by-line in your terminal to set up the project:

    $ git clone [email protected]:Make-School-Labs/makescraper.git
    $ cd makescraper
    $ git remote rm origin
    $ git remote add origin [email protected]:YOUR_GITHUB_USERNAME/makescraper.git
    $ go mod download
  3. Open README.md in your editor and replace all instances of YOUR_GITHUB_USERNAME with your GitHub username to enable the Go Report Card badge.

Deliverables

Complete each task in the order they appear. Use GitHub Task List syntax to update the task list.

Requirements

Scraping

  • IMPORTANT: Complete the Web Scraper Workflow worksheet distributed in class.
  • Create a struct to store your data.
  • Refactor the c.OnHTML callback on line 16 chromedp version to use the selector(s) you tested while completing the worksheet.
  • Print the data you scraped to stdout.
Stretch Challenges
  • Add more fields to your struct. Extract multiple data points from the website. Print them to stdout in a readable format.

Serializing & Saving

  • Serialize the struct you created to JSON. Print the JSON to stdout to validate it.
  • Write scraped data to a file named output.json.
  • Add, commit, and push to GitHub.

Resources

Lesson Plans

Example Code

Scraping

Serializing & Saving

  • JSON to Struct: Paste any JSON data and convert it into a Go structure that will support storing that data.
  • GoByExample - JSON: Covers Go's built-in support for JSON encoding and decoding to and from built-in and custom data types (structs).
  • GoByExample - Writing Files: Covers creating new files and writing to them.

makescraper's People

Contributors

aucoeur avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.