TLDR: I'm combing the two projects together and will release a Python Twitter Cryptobot to rule them all. Check back on this post or my GitHub for updates.
Do Nerds Dream of Androids?
I was sitting in my System Administrator Workshop today feeling a bit bored. We were going over something that I know entirely too much about and my mind started to wander, I felt like I was in a meadow, a cool summer breeze caressing my cheeks (you can decide which ones 🤣), and the sound of birds chirping and tweeting their little hearts out. Then it hit me, "I need to make a Crypto Twitter Bot."
I had dabbled in Twitter bots using Python back in 2018 while on a train bound for Manhattan, so it wasn't a totally foreign concept. However, with age comes wisdom, and knowing that someone else brighter out there has probably built something close to what I needed already, I headed over to GitHub. I first decided to check out my bot but quickly realized that mine was too basic and unfit for the job. It was a simple Tweet THIS line from THIS text file every hour that tweeted Gruntilda quotes of Banjo-Kazooie fame. Its name was lovingly given as "GruntyBot", but again, it would not suit my purpose. What did suit my needs from GruntyBot was the Twitter Profile it used to be. I repurposed the account instead of creating a new one, generated new API keys, removed all the content using a tool through the Twitter API, and rebranded it as CryptoCondition (Boo! Your name sucks!).
After searching around back over at GitHub, I found two projects that did exactly what I wanted, but in different ways. The first project I found was MrCyrptoT's Crypto_Price Python Bot. This bot uses CoinGeko and CoinMarketCap to poll the markets and get a treasure trove of data. After a bit of tooling around and realizing that I couldn't use coins that have a hyphen in their name with CoinGeko, I disabled that portion of the bot to get the debugging to print the prices and what the Tweet would eventually look like. I have forked this on my GitHub profile and will be attempting to correct that issue to merge with the master branch.
Once all that was working and tweeting the hourly prices to the account, I started looking for another bot that would tweet news stories from an RSS feed. I found one even better than what I thought I wanted. PeterDalle's twitterbot allows you to not only post from an RSS feed but also retweets other accounts based on specified hashtags. The only issue that I found with this bot was it uses only a single RSS feed. The way I worked around this was using RSSMix.com to combine the top Crypto News sites from around the web into a single XML feed. Once I added my hashtags and blacklist a few others, I aimed my bot at my API keys and set up a cron to run the script in different intervals as to not make the Twitter API angry. With a single follower (yours truly) my bot set out to engage with the Twittersphere.
Within its first few hours, it gained 5 organic followers, multiple retweets, and likes from people in the Twitter Crypto communities. So why did I write this post? Well, I decided that since both of the projects are great and do what one might want to do in tandem just fine, what if they were combined? Since they are both open-source, I am able to remix the two into a single, powerful bot. I will of course submit any bug fixes to the original project and link back to them directly as they are both excellent tools in their own right.
Keep an eye out on this post or my GitHub for future updates. You really have to love open source and the communities revolving around them. Remember, it's okay to stand on the shoulders of giants but also remember to give back and allow others to sit upon your shoulders in the future.
Cool stuff. I dabble with Python as well as using it for work. I've been using some scripts to compile lists of Hive users. I have considered writing some sort of bot if I could think of a use for it. Should be possible to run on a Raspberry Pi that can be left on 24/7. I'll check out your code for ideas.
Have another !BEER.
post this on leofinance.io you could probably make upwards of $50, just tryin to help! You could even Copy and paste, and just clear this post so its not a duplicate.. and thatd be fine I bet
Would it be acceptable on Leo as it's not financial?
Yes it is financial! It’s about crypto lol!
Can always add the tag. Can do STEM one too
Yea! Add all the fuckin tags, and ask forgiveness later haha
Thanks for the heads up! I'll add those shortly 😁
Congratulations @sippycup540! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :
Your next target is to reach 100 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Check out the last post from @hivebuzz:
View or trade
BEER
.Hey @sippycup540, here is a little bit of
BEER
from @steevc for you. Enjoy it!Learn how to earn FREE BEER each day by staking your
BEER
.