Sign inSign up

kenney/bingrewards

By kenney

•Updated about 8 years ago

run reward script

Image
0

533

kenney/bingrewards repository overview

⁠BingRewards

⁠CircleCI (L:Precise), TravisCI (L:Trusty), Coverall, Container, Pyup, Python, CodeClimate badges

CircleCI Build Status Coverage Status Codeship Status for kenneyhe/BingRewards Updates Python 3 Maintainability

⁠About

BingRewards is an automated point earning script that works with Bing.com to earn points that can be redeemed for giftcards.

⁠Requirements

Python 2.7+

⁠Running The Script

Copy config.xml.dist to config.xml
Enter accounts in <accounts> section.
Ensure <events> match accounts or are commented out.

Linux/Mac

$ cd path/to/bingrewards
$ ./main.py

Windows

> cd path\to\bingrewards
> python main.py

⁠Config

⁠General

betweenQueriesInterval: Number of seconds between queries
betweenQueriesSalt: Random number of seconds added between queries
betweenAccountsInterval Number of seconds between accounts
betweenAccountsSalt Random number of seconds added between accounds
addSearchesDesktop Number of extra desktop searches
addSearchesDesktopSalt Random number of added desktop searches
addSearchesMobile Number of extra mobile searches
addSearchesMobileSalt Random number of added mobile searches

⁠Accounts

You can have as many account tags as you need.
Note: User-Agent fields are optional. If omitted a random User-Agent will be selected. Use caution when entering a custom User-Agent. If User-Agent is not associated with a common browser Bing! might flag you as a bot.
Note: Two-Factor Authentication (2FA) is not supported.


<account type="Live" disabled="(true|false)">
    <login>[email protected]</login>
    <password>passwordhere</password>
    <ua_desktop><![CDATA[YOUR DESKTOP USER AGENT HERE]]></ua_desktop>
    <ua_mobile><![CDATA[YOUR MOBILE USER AGENT HERE]]></ua_mobile>
</account>
⁠Query Generators
  • bing
  • googleTrends
  • wikipedia
⁠Events

onError: Defines what the script should do when an error occurs durring processing an account.
onComplete: Defines how the script should behave when it completes processing an account.
onScriptComplete: A special event which occurs only once when the script finishes executing.
onScriptFailure: A special event which occurs only once and if the script fails with exception some time after successfully loading the config.

⁠Automating

FAAS support


# openfaas deploying swarm and server at http://localhost:8080
docker swarm init
git clone https://github.com/openfaas/faas && \
    cd faas && \
    git checkout 0.6.5 && \
    ./deploy_stack.sh

# generate image and deploy
docker build -t kenney/bingreward .

faas-cli deploy -f compose.yml -replace=true

# wait less than a minute for port to be open
docker service ls

# if not HTTPS
openssl aes-256-cbc -e -in config.xml -k "${KEY}" | openssl enc -base64 > ~/config.enc
curl http://localhost:8080/function/bing --data-binary @$HOME/config.enc > output.txt

# test containers before heading to codeship
jet steps

⁠create only artifacts

python -m compileall .

⁠removal steps

⁠function name is service name

docker service rm bing

⁠cleanup

rm -rf faas

⁠References

Tag summary

Content type

Image

Digest

Size

24.6 MB

Last updated

over 8 years ago

docker pull kenney/bingrewards