Git Product home page Git Product logo

ourkino's Introduction

ourkino's People

Contributors

diurnalist avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ourkino's Issues

Rearchitect in Golang

There is no real reason for this, except for my own learning.

Some changes from the initial design I'd like to make:

  • Provide location configuration as separate YAML files; have the tool output the schedule either in CLI or HTML output w/ a configuration file as input. Input file will have the location name, timezone, and a list of theatres to pull from. Each theatre configuration will have a name, scrape driver, and scrape driver parameters, which will be specific to the scraper.
  • Formalize the scraper interface a bit more; instantiate a scraper with its parameters and execute the scrape w/ the target date as the input. Output should be a list of showtimes. Showtimes should have the theatre name, showtime name, language information, date and time (timezone-localized) and a deeplink to more information about the film.
  • Consider using a work queue for issuing scrape requests to have a way of limiting request throughput. Such a queue could be injected on the scrape call.

Basic architecture:

  1. Command layer parses arguments and configuration input and instantiates all the necessary scrapers and handles writing error responses.
  2. Scraper layer issues HTTP requests and parses the response however it needs to, ultimately returning a list of showtimes.
  3. Render layer takes the showtimes, arranges them however and writes out some sort of response, either to console or external file.

Other notes:

  • Use golang net/html library for HTML parsing

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.