Giter VIP home page Giter VIP logo

tweetdrop's Introduction

tweetdrop

Simple script to collect and clean Ethereum addresses and ENS names from replies to a Tweet. Inspired by punk4156 needing to airdrop thousands of addresses.

Produces batches of text files containing 100 addresses (one-per-line) per-file in the format address, tokenAmount, in /output, to use with Disperse or Multisender.

Requirements

  1. Twitter API V2 access (easy to apply for at developer.twitter.com). You will need a V2 API Bearer Token.
  2. Conversation ID for thread you'd like to scrape. This is the number after /status/ in a tweets direct URL. For example, 1428089265641201665 for punk4156s tweet (https://twitter.com/punk4156/status/1428089265641201665). Because of Twitter API limitations, the thread must be less than 7 days old.
  3. Optional: If you'd like to resolve ENS names to addresses (necessary for Disperse), an Ethereum RPC url.

Steps

# 1. Copy .env.sample to .env and fill out environment variables
# NUM_TOKENS should be how many tokens you'd like to airdrop per address
cp .env.sample .env

# 2. Install dependencies
npm install

# 3. Run script
npm run start

Credits

Extras

Most recent followers

Inspired by Cole's tweet, Tweetdrop supports scraping your latest X followers.

Limitations:

  • Really, none, beyond Twitter imposed timeouts (max: 30,000 followers / 15 minutes). By default, script pulls 15,000 newest followers at once.

Steps:

# 1. Update only TWITTER_BEARER and TWITTER_USER (handle)
cp .env.sample .env

# 2. Install dependencies
npm install

# 3. Run followers script
npm run followers

Outputs:

  • follower-ids.json: List of all follower ids
  • follower-details.json: List of follower details (beyond just id: name, handle, description, followers_count, following_count, verified, created_at)

tweetdrop's People

Contributors

anish-agnihotri avatar rootulp 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  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  avatar  avatar  avatar

tweetdrop's Issues

Issues with parsing ens

Hey! I've integrated a fork of this library into https://github.com/iainnash/ens2airdrop ens2airdrop and found some issues with it:

  1. .Eth is not recognized: changed the ens regex to support case insensitive matches
  2. people incorrectly uppercase ens names, so it does a search for both the exact case and lowercase versions
  3. Regex for detecting ens names doesn't handle cases where the name is unicode or non-ascii.
  4. Invalid addresses are still added to the result if they follow any sort of 0xNNN format, added in an ethers isAddress(str) check to determine if invalid/valid.

These all are fixed in the forked scraper https://github.com/iainnash/ens2airdrop/blob/main/scraper/scraper.ts here.

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.