Code Monkey home page Code Monkey logo

straeto-scraper's Introduction

straeto-scraper

A simple Python scraper for s.is

First version, undocumented and very raw. Run the scraper:

$ ./scraper.py

and your current directory will fill up with route-XX.json files containing info for routes 1 - 44.

Depends on the Requests HTTP library.

When you have scraped all the routes you can manually inspect the data using srvr.py. It is a simple WSGI server that displays a timetable for the routes in the current directory. Run the server from the same directory as your json files are:

$ gunicorn srvr:app

Now you can browse the timetables on http://localhost:8000.

API

api.py contains a simple JSON API interface that uses the scraped data. Before running the API an SQLite DB needs to be created from the JSON files from the scraper. Create the DB:

$ ./create-db.py

and then run the API:

$ python api.py

It depends on Flask.

straeto-scraper's People

Contributors

baldurthoremilsson avatar gudmundur avatar

Watchers

 avatar  avatar

Forkers

gudmundur

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.