GithubHelp home page GithubHelp logo

kwbmm / scraped-tvtime-api Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 3.0 46 KB

A free TVTime API based on scraping TVTime website. No API key required

License: Mozilla Public License 2.0

Python 97.01% Makefile 1.97% Dockerfile 1.01%
tvtime tvtime-api scraper flask-api

scraped-tvtime-api's People

Contributors

kwbmm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scraped-tvtime-api's Issues

Improve handling of cookies

After performing a request, the response from TVTime always returns a new cookie. This cookie should be updated in the Flask session automatically when doing a request.
Right now, we have to manually call Utils.update_tvtime_cookies() after each request. This should be avoided as it can lead to issues.

Reject insecure requests

The API should reject all requests not using HTTPS.
This is because we are dealing with sensitive information, so no data should be passed over the network in clear text.

Packaging

This API should be packaged for easy distribution.

  • Look into how to create packages
  • Upload to pip?
  • Automate releases on github

Error handling

API should handle errors through JSON and HTTP codes rather than crashing.

  • When login fails
  • When no show is found
  • When episode watch trigger fails

A test user

To perform tests, a test user is needed.

Requirements

  • The user should have a list of known series for test purposes.
  • It should be possible to create a random user on-the-fly
  • The user should be deleted once tests are over
  • The API should not offer a way to create a new user.

Documenting API

A better way to document the API should be put in place.
Relying on a table written in markdown is not the best option.
Ideally, it would be great if API documentation can be generated automatically from the code, so that it is always kept up to date.

Dockerization

Having to start your own Flask server is not ideal.
What if the project could be dockerized and one could just launch the container and have the API exposed and ready to handle requests?

Remarks

  • Server session secret key should be passed in some way down to the flask app
  • Maybe should deal with SSL certificates?

Add/Remove shows

The API should offer a way to add shows to follow to your profile.

This is a requirement for #3

A build pipeline

A pipeline should be set up to verify the integrity of the code:

  • When a new commit is pushed, tests should be run

Bonus

  • Tests should be run daily
  • Code coverage

A logging system

To provide information to the end user about errors, especially when testing, a logging system should be implemented.

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.