Giter Club home page Giter Club logo

scrapey-mcscrape's Introduction

What?

This node module scrapes WeGotTickets.com and outputs the event data in a .json file:

{
  "eventTitle": "Example event",
  "eventUrl": "http://www.wegottickets.com/event/1",
  "eventId": "1",
  "city": "LONDON",
  "venue": "Hyde Park",
  "date": "Tue 27th Dec, 2016, 10:00am",
  "totalPrice": "£10.00"
}

Dependencies

Node v6.0.0

"dependencies": {
  "cheerio": "^0.22.0",
  "request": "^2.79.0"
}

Request

Request is a node module that allows us to easily make a request to fetch the WeGotTickets webpages.

Cheerio

Cheerio is a node module that provides a jQuery-like interface to interact with a piece of HTML and allows us to easily select the required data from WeGotTickets.

How?

Assuming you have Node v6.0.0 or later:

Run npm install

To output the first page of events from http://www.wegottickets.com/searchresults/all, simply run npm run scrape

If you want more than 1 page, just add the number of pages you would like onto the end of the npm script. E.g. to scrape 5 pages, run npm run scrape 5

After these scripts are run, all the event .json data will appear in your data folder as if by magic 🔮 ✨

Tests

To run the tests, run npm t

scrapey-mcscrape's People

Contributors

naazy avatar

Watchers

James Cloos avatar Harry Fox 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.