Skip to content

spaun299/tv_parser

Repository files navigation

#This is tv channels and programs parser ###To run this you should:

  • 1.)install required package libs:
    sudo apt-get install libpq-dev
  • 2:)install phantomjs(local):
    sudo apt-get install phantomjs
    (openshift with ghostdriver):
    cd tvparser
    scp required_apps/phantomjs SSH_KEY:$OPENSHIFT_DATA_DIR
    ssh to your openshift app
    cd $OPENSHIFT_DATA_DIR/phantomjs/bin
    chmod +x phantomjs
    if file '.openshift/action_hooks/post_deploy' exists and you want change ghostdriver port,
    you can do it by modify .openshift/action_hooks/post_deploy file.
    But then you have to run 'chmod +x .openshift/action_hooks/post_deploy' and
    'chmod +x .openshift/action_hooks/pre_build',
  • 3:)install necessary libraries:
    source venv/bin/activate
    pip instal -r requirements.txt
  • 4:)install and configure rhc tool:
    RHC install guide
  • 5:)install postgresql-9.2:
    sudo add-apt-repository ppa:pitti/postgresql
    sudo apt-get update
    sudo apt-get install postgresql-9.2
  • 6:)CREATE DB and USER
    sudo -u admin psql
    CREATE DATABASE yandex;
    CREATE USER admin with password '1111';
    GRANT ALL privileges ON DATABASE yandex TO admin;
  • 7:)CREATE ALL SEQUENCES AND TABLES:
    cd sql_scripts
    LOCALHOST:
    sudo -u admin psql -d yandex -a -f SCRIPT_NAME
    OPENSHIFT:
    psql -d $PGDATABASE -a -f SCRIPT_NAME
  • 8:)Add cron cartridge to openshift to run script on scheduler:
    rhc cartridge add cron-1.4 -a yandex

###Errors:

  • If you have problem with smtp connection, you can try:
    go to this page
    and try to run program (you have 10 minutes)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published