Skip to main content

Wen Mint

A handy command line tool to scrape Ethereum addresses from your comment threads for more efficient giveaways.

Social networks supported

Currently this tool works with:

  • Reddit
  • Twitter
  • Other networks if you are able to extract CSVs of comments

Getting started

The easist way to use this tool is to download it from pip.

pip install wen-mint

It requires python 3.10 or later. if that poses problems for older systems there is a dockerfile in the project's root.

To use the scraping tools, you must include api credentials in a config file. This module can help you generate the file (and obtain a Reddit refresh token), but the core tokens must be obtained manually from the each social network used.

Usage

Provided are a few examples to get you up and running. More extensive documentation can be found in the --help menus.

  • wen-mint generate_config --output <WHERETOSAVETHECONFIGFILE> --twitter_bearer_token <YOURTOKEN> Creates a config file using your Twitter bearer token that can be used for the Twitter address extraction function.
  • wen-mint get_reddit_refresh_token --config_path <LOCATIONOFYOURCONFIGFILE> Allows you to retrieve a Reddit Refresh token to be used for the Reddit address extraction function. (Requires a config file with filled in values for "Reddit_client_id", "Reddit_client_secret", and "Reddit_redirect_url")
  • wen-mint reddit <REDDITPOSTID> --config_path <LOCATIONOFYOURCONFIGFILE> Captures ethereum addresses from the post specified and displays them all seperated by a space in the terminal output. (Requires a config file with filled in values for "Reddit_client_id", "Reddit_client_secret", and "Reddit_refresh_token")
  • wen-mint twitter <TWITTERCONVERSATIONID> --config_path <LOCATIONOFYOURCONFIGFILE> --output <FILEPATHTOSAVECSV> --random_sample 20 --uniform_addresses --liked_only Scrapes a Twitter thread for addresses and exports a csv that contains more details like the post id, username, and the original text. Also converts all ens addresses to their hexadecimal hash equivelents takes a random sample of 20 after excluding participants who did not like the post, removing all duplicates and instances where no address could be found. (Requires a config file with filled in values for "Twitter_bearer_token" and "ethereum_provider_url" [if enabling "--uniform_addresses"])
  • wen-mint csv <LOCATIONOFINPUTCSV> --post_column "Some posts and junk" --low_precision Extracts all findable ethereum addresses in a csv where the column for the posts has been prenamed "Some posts and junk". Example csv contains newline characters accidentally stripped out so extraction uses a lower precision method that ignores neighboring characters.

Considerations

Ethereum addresses are extracted using a targeted regex string that eliminates most cases of false positives and false negatives.

  • You will want to use the algorithm in most cases, but it will exclude rare instances when an address runs directly on other words without spaces or newlines seperating them.
  • A more permissive approach (that increases false positives) is included in the csv option. Use --low_precision to find matches regardless of neighboring non-alphanumeric characters.
  • If a single comment contains multiple addresses, only the first address is taken.
  • If a single user contributes multiple comments with different addresses only 1 of these (the earliest occuring by id) is taken.

Make sure you convey to your audience to not do wild things to their addresses to ensure that nobody disqualifies themselves by submitting something like "lol😂😂thereisnospaceorlinebreakbetweenmyaddress.eth😂😂😂" Included the repo is example.csv where you can test some of these cases.

Warning for address lookup and substitution

If connecting to an Ethereum API to change ENS addresses to Ethereum hashes, connecting via a websocket url is currently broken. Connect via http for now instead.

Having trouble with the Reddit refresh token?

Getting the Reddit refresh token may seem complicated, but it only has to be done once. The key thing to remember is making sure the url on the app you registered (and the port) matches exactly what is in the config file. For example, if you wanted to authenticate locally on port 42069, you would need to have this http://localhost:42069 for the line that says "redirect uri" for the app on Reddit and also in the config file under "Reddit_redirect_url"

Need to run without the installed alias?

If you installed the program and are having trouble accessing the alias wen-min, you can always access it directly within python with a slight modification to the command. Use python -m wen_mint.clito run it directly.

One final note

This is a powerful open source tool that leverages other powerful open source tools and is built with the intent of making everyone's lives easier and more efficient. How you use it is your responsibility. Don't be one of those guys that ruins good things for everyone else.

Metadata

Release files for wen-mint 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wen-mint 0.2.2
File Size Uploaded Provenance Actions
wen-mint-0.2.2.tar.gz 32.1 kB Without provenance Details for wen-mint-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wen-mint 0.2.2
File Interpreter ABI Platform Actions
wen_mint-0.2.2-py3-none-any.whl Python 3 none any Details for wen_mint-0.2.2-py3-none-any.whl

Total release size: 64.4 kB

Release files / wen-mint-0.2.2.tar.gz

Download URL wen-mint-0.2.2.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
518b96d36ec2282ca2ffa375d6b7d986beb3112808eca615768c75db51e5ead2
BLAKE2b-256 checksum
How to use checksums
2c7f31a03892dcb15ec3ef1c73adcf8b5a01f4d010b2a782631becd20ff02bea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / wen_mint-0.2.2-py3-none-any.whl

Download URL wen_mint-0.2.2-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bc3f1a0bf46a404dd31771c2f631b6cbb722e9a8dcde1ec553b9020f503afa8
BLAKE2b-256 checksum
How to use checksums
199804a8ed0d61a43b565e52c117e6f999764a811db31c1ed392e01d2ce674a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for wen-mint 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page