Giter VIP home page Giter VIP logo

giveawaynftbot's Introduction

Giveaway NFT bot

Bot that automatically signs up to NFT giveaways on Reddit!

Screen Shot 2021-09-22 at 17 52 12

Getting started

Run: pip install -r requirements.txt.

How it works

Select your bot configurations in config.ini, including your Reddit API key from here.

[Credentials]
API_REDDIT_CLIENT_ID
API_REDDIT_CLIENT_SECRET
API_REDDIT_USERNAME
API_REDDIT_USER_AGENT
API_REDDIT_PASSWORD

[Bot]
OPENSEA_WALLET
MAX_GIVEAWAYS
MIN_SECS_SLEEP
MAX_SECS_SLEEP

[Reddit]
REDDIT_SUBS
REDDIT_COMMENTS
REDDIT_EMOJIS

Then you just need to run the python script with python giveaway_nft_bot.py.

Pseudocode

  1. Login to Reddit using the API_REDDIT_* keys provided.
  2. Iterate through the posts in the REDDIT_SUBS list specified that contain the keyword GIVEAWAY.
  3. Check that we have not commented+upvoted on a post from this author before, to avoid participating on same giveaway from 2 different subs.
  4. Check that our bot has not commented on the post before.
  5. Upvote post.
  6. Comment on post by randomly picking a comment from REDDIT_COMMENTS, adding OPENSEA_WALLET and picking a random nice emoji from REDDIT_EMOJIS.
  7. Print information about a post. E.g.
URL:  https://www.reddit.com/r/opensea/comments/pgqzh8/cryptocartooneaters_nft_giveaway_one_winner_will/
TITLE:  CryptoCartoonEaters NFT Giveaway! One winner will be randomly selected on September 9th. Follow details in comments to win.
OPENSEA:  https://opensea.io/collection/crypto-cartooneaters
  1. Open the Opensea link to the collectible/collection. This is because on most giveaways, favouriting the collectibe/collection is necessary. E.g. https://opensea.io/collection/crypto-cartooneaters.
  2. Wait for a random time between MIN_SECS_SLEEP and MAX_SECS_SLEEP until next post. This is to avoid Reddit detecting us as a bot.
  3. Stop when we reach MAX_GIVEAWAYS

Say thanks

Using this method, you are able to get sick NFTs that may be worth a fortune in the future.

I just got my hands on Goku eating a Burger from CryptoCartoonEaters NFT collection, and they are my favourite.

Feel free to thank me by sending me some nice NFT artwork to my Opensea wallet: 0x5c747aa296f8621a572881fe6386b6739c1b80f8

Disclaimer

Although this is an interesting bot application you should note Reddit rules:

"Votes must be cast by humans. That is, API clients proxying a human’s action one-for-one are OK, but bots deciding how to vote on content or amplifying a human’s vote are not. See the reddit rules for more details on what constitutes vote cheating."

Future improvements

Some future possible improvements could be to be even more automated. For example, by connecting your twitter/insta account and either retweet or like a post based on what the OP requires to participate on the giveaway.

If you are interested in improving the bot, feel free to contribute. You may use the jupyter notebook for faster development.

giveawaynftbot's People

Contributors

didierrlopes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

giveawaynftbot's Issues

PRAW update issue (?)

Hello there;

I use to use this bot and it worked fine (1y ago) /

Upon running, it said PRAW version needed to be updated . I did using pip install --upgrade praw / I updated python also to v23.something - (upon updating praw, it offered me a command line to update python).

after some time this is what I get :

C:\Users\XX\Desktop\GiveawayNFTbot-main>python giveaway_nft_bot.py
Traceback (most recent call last):
File "C:\Users\XX\Desktop\GiveawayNFTbot-main\giveaway_nft_bot.py", line 40, in
psaw_api = PushshiftAPI()
File "C:\Users\XX\AppData\Local\Programs\Python\Python310\lib\site-packages\psaw\PushshiftAPI.py", line 326, in init
super().init(*args, **kwargs)
File "C:\Users\XX\AppData\Local\Programs\Python\Python310\lib\site-packages\psaw\PushshiftAPI.py", line 94, in init
response = self._get(self.base_url.format(endpoint='meta'))
File "C:\Users\XX\AppData\Local\Programs\Python\Python310\lib\site-packages\psaw\PushshiftAPI.py", line 194, in _get
raise Exception("Unable to connect to pushshift.io. Max retries exceeded.")
Exception: Unable to connect to pushshift.io. Max retries exceeded.

Any Idea what I did wrong ?

thanks :)

how the heck do i run this

I know how to at least upload the folder to vs code but what tf do i do from there. I have the config all set up but otherwise im stuck. Please and thanks.

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.