Giter Site home page Giter Site logo

amex-auto-save's Introduction

What is it?

It's a simple script to automatically save all available offers for your AmEx card.

What's supported?

At the moment the script was tested only with British Airways American Express Credit Card.

How it's working?

Under the hood the script uses Selenium Webdriver and Python3. You have to provide your AmEx credentials, and the script will save the offers for you. It optionally can send notifications to a specific telegram chat.

Setting up

Option 1, easiest, using docker-compose

Clone this repo locally:

git clone https://github.com/andrey-yantsen/amex-auto-save.git

Create .env file within the folder with project, setting proper values:

LOGIN=<LOGIN>
PASSWORD=<PASSWORD>

RESTART_DELAY=3600

TELEGRAM_TOKEN=<TOKEN>
TELEGRAM_CHAT_ID=<USER_ID>

Replace <LOGIN> with your AmEx username and <PASSWORD> with your password. RESTART_DELAY variable should be set to an interval in seconds between checks — in this example it's 1 hour (3600 seconds). To obtain a token for telegram you have to create a new bot using @BotFather, and to get your user_id in Telegram — just drop a message to @userinfobot.

And, finally, run everything with docker-compose up.

Option 2, less easy, using docker directly

Run docker instance with selenium:

docker run -d --name selenium-server \
           --log-opt max-size=10m \
           --log-opt max-file=3 \
           selenium/standalone-chrome 

Run docker instance with the script, replacing placeholders the save way as in 1st option:

docker run -d -e 'LOGIN=<LOGIN>' \
           -e 'PASSWORD=<PASSWORD>' \
           -e 'RESTART_DELAY=3600' \
           -e 'TELEGRAM_TOKEN=<TOKEN>' \
           -e 'TELEGRAM_CHAT_ID=<USER_ID>' \
           -e 'SELENIUM_HOST=selenium-server' \
           --log-opt max-size=10m \
           --log-opt max-file=3 \
           --name amexer --restart=on-failure virus/amex-auto-save

Option 3, for those, who knows what they're doing

The project has pipenv files, use it wisely.

amex-auto-save's People

Contributors

andrey-yantsen avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amex-auto-save's Issues

At some point of time the script forces amex to reset your password

If you'll leave the scrip active for a couple weeks — your password would become invalid. Probably because the script looks for specific html elements, and if it fails to find any — an exception would be raised, and the script would be restarted nearly immediately.

Current theory that AmEx doesn't like too frequent logins even with correct password.

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.