The bot.py
file is placed into a Google Cloud function. Whenever a user makes a request to the function's URL, the Cloud Function calls the update_bot
method. update_bot
scrapes the bountylist website and uses Tweepy to post the latest bounties to the Twitter account.
Note that this code assumes you have configured the environment variables consumer_key
, consumer_secret
, access_token
, access_token_secret
, and bearer_token
appropriately in your Google Cloud function / AWS Lambda / whatever. (AWS Lambda is not recommended for Twitter bots because the installation process is a little trickier.)
vkethana / hackerbounty-twitter-bot Goto Github PK
View Code? Open in Web Editor NEWTwitter bot for https://bountylist.org/detail/yifztbo. No official affiliation with website (yet)