Giter Club home page Giter Club logo

arblocker's Introduction

Intro

Have you ever encountered a Tweet that smells like stink? In my case, I usually dream about blocking all those hundreds of people who liked that Tweet. These Tweets are usually posted by special accounts, and are promoted by other special accounts, such as the accounts served as the governments' propaganda.

Silencing the opposite voice isn't something to encourage, but sometimes our mental heath is more important.

Usage

In order to run this script on behalf of your account, you need to set up a few things first. If you already have a Twitter Developer account, continue from step 3:

  1. Visit Twitter Developer Platform and submit your information to access the Developer Portal.
  2. Then, go ahead and create an App inside a Project, and save API Key and API Secret values.
  3. Go to User authentication settings section at the Settings page of your App.
  4. Enable OAuth 1.0a, check Read and Write permissions, and put something random (like localhost) for callback urls.
  5. Go to Keys and tokens section of your App and generate Access Token and Secret.

Now, it's sufficient to pass these information as environment variables and run the code:

  • API_KEY: The API Key obtained in the previous section
  • API_SECRET: The API Secret obtained in the previous section
  • ACCESS_TOKEN: The Access Token obtained in the previous section
  • ACCESS_TOKEN_SECRET: The Access Token Secret obtained in the previous section
  • TWEET_ID: The ID of the Tweet you want all accounts who liked it to be blocked. This can be obtained from a Tweet's URL, i.e. twitter.com/username/status/<ID>

You can create a .env file containing NAME=VALUE lines for your environment variables.

Finally, install the dependencies and run the code:

git clone https://github.com/alitoufighi/arzeshi-block.git
cd arzeshi-block
pip install -r requirements.txt
python main.py

Note

Note that Twitter allows you to perform a limited number of API calls with this free account. This script will wait in case of reaching the rate limit. Hence, it may take a long time if you're running it against a viral Tweet.

arblocker's People

Contributors

alitoufighi avatar

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.