项目作者: furkankyildirim

项目描述 :
This code repository allows you to pull information about Netflix movies and actors from a particular site, and the last watch date of movies that will be removed from Netflix.
高级语言: Python
项目地址: git://github.com/furkankyildirim/FlixWatcher.git
创建时间: 2021-06-08T19:04:43Z
项目社区:https://github.com/furkankyildirim/FlixWatcher

开源协议:

下载


FlixWatcher

This code repository allows you to pull information about Netflix movies and actors from a particular site, and the last watch date of movies that will be removed from Netflix.

Installation

Be sure to use the same version of the code as the version of the docs you’re reading.
You probably want the latest tagged version, but the default Git version is the master branch.

  1. # clone the repository
  2. $ git clone https://github.com/furkankyildirim/FlixWatcher
  3. $ cd FlixWatcher
  4. # checkout the correct version
  5. $ git tag

Create a virtualenv and activate it:

  1. $ python3 -m venv venv --without-pip
  2. $ source venv/bin/activate

Install pip3 requirements

  1. $ pip3 install -r requirements.txt

Run

Run Loaders

If you want to run Loader or Loader2:

  1. $ source venv/bin/activate
  2. $ python3 -m Loader #or python3 -m Loader

When the program starts, it reflects the player and movie data taken from the website to the console. It also saves movie and player data to the database you specify in the config.ini file.

Run Service on Flask

  1. $ export FLASK_APP=Service
  2. # to run in developer mode
  3. $ export FLASK_ENV=development
  4. $ flask run

Or on Windows cmd:

  1. $ set FLASK_APP=Service
  2. # to run in developer mode
  3. $ set FLASK_ENV=development
  4. $ flask run

Open http://127.0.0.1:5000 in a browser.

Run Service on Gunicorn

  1. # if your service does not have Gunicorn server
  2. $ pip3 install gunicorn
  3. $ ./runner.sh
  4. # to the service to run in the background
  5. $ ./runner.sh &

Edit Config File

Edit the config.ini file so that the program can run on your own computer.

  1. [Database]
  2. host = Your_hostname
  3. port = Your_portname
  4. user = Your_username
  5. pass = Your_password
  6. db = Your_DBname
  7. [Service]
  8. host = Your_hostname
  9. port = Your_portname

Edit the runner.sh file so that the program can run on your gunicorn service

  1. NUM_WORKERS=1
  2. TIMEOUT=600
  3. exec gunicorn Service:app \
  4. --workers $NUM_WORKERS \
  5. --timeout $TIMEOUT \
  6. --log-level=debug \
  7. --bind=127.0.0.1:5000 \

Common Issues

If you cannot to connect to your server:

  1. $ kill $(lsof -t -i:your_portname)

If you get the error (Permission denied) when try to run runner.sh

  1. $ chmod +x runner.sh

If you get ssh error when try to connect MySql Database
you should execute:

  1. $ ALTER USER 'your_username'@'your_hostname' IDENTIFIED BY 'your_password' PASSWORD EXPIRE NEVER;
  2. $ ALTER USER 'your_username'@'your_hostname' IDENTIFIED WITH mysql_native_password BY 'your_password****';

NOTE: The Loader file may give an error because the template of the websites from which the data is drawn may change in the future.