{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreieqc7524uui4h6oayqgyrykmrxi4ifzmwp6vv5er5cgrgz7lagfza",
    "uri": "at://did:plc:ogsypfnyf6uzkppsrqgdirne/app.bsky.feed.post/3m5zfmj7s32g2"
  },
  "path": "/_posts/2022-03-15-twitter-block-advertisers/",
  "publishedAt": "2026-06-11T10:32:18.314Z",
  "site": "https://nickwasused.com",
  "tags": [
    "uBlock Origin",
    "a Twitter Developer Account",
    "the program",
    "Python3 and pip3",
    "get your Twitter Data Archive from here"
  ],
  "textContent": "# Notice\n\nAs of March 31, 2023, this method is not a good way of blocking Advertising on Twitter; you should just use something like uBlock Origin or alternative Apps.\n\n## Requirements\n\nFor following this Guide, you need the following:\n\n  * a Twitter Developer Account Your Twitter Data Archive](https://twitter.com/settings/download_your_data)\n  * the program\n  * Python3 and pip3\n\n\n\n## Program Setup\n\nLet's start by getting the Program set up.\n\nFirst, we need to install the requirements by running\n\n\n    pip3 install -r requirements.txt --user\n\n\nAfter that, you need to copy the `.env.example` file to `.env`\n\nNow you have to get your Twitter Developer Credential and fill it in the `.env` file.\n\n\n    API_KEY=\"\"\n    API_SECRET=\"\"\n    ACCESS_TOKEN=\"\"\n    ACCESS_TOKEN_SECRET=\"\"\n\n\nYou have to get them on the Twitter Developer Site > your App > Keys and Tokens:\n\n## Twitter Data\n\nNow get your Twitter Data Archive from here\n\nAfter you have requested the Archive wait for the Notification Email. (This can take hours to days!)\n\nUnpack the archive into the folder called `export`.\n\nThe directory structure should look like this now:\n\n\n    - export\n        - assets\n        - data\n        - .gitkeep\n        - Your archive.html\n    - .env\n    - main.py\n    ...\n\n\n## Get the List\n\nNow you just must run: ```bash python3 main.py\n\n\n    The script will output a file called ```export.csv``` and tell you how many Advertising Accounts you have seen. For me, it was around 750 Accounts, but in this example, I will use a list of 3 Accounts.\n\n    ## Block the Accounts\n\n    To Block the accounts, you need to upload the ```export.csv``` content to [Pastebin](https://pastebin.com) or another site.\n\n    Paste the contents ```export.csv``` in the input field and click ```create Paste```.\n    ![Pastebin-paste](./pastebin-paste.webp \"\")\n\n    Now you are redirected to your paste. Click on ```raw``` and copy the link.\n    ![Pastebin-raw](./pastebin-raw.webp \"\")\n\n    Now go to this site: [https://twitter-blocklist-auth.glitch.me/](https://twitter-blocklist-auth.glitch.me/) and log in.\n\n    Now you can paste the URL you have copied before in the field and click Submit.\n    ![Glitch-setup](./glitch-setup.webp \"\")\n\n    After that, the Page will tell you how many Accounts got blocked.\n    ![Glitch-final](./glitch-final.webp \"\")\n\n    ### archive\n\n    The following links are archived versions, as the main ones could break.\n\n    [https://ublockorigin.com/](https://web.archive.org/web/20240519173755/https://ublockorigin.com/)\n    [https://developer.twitter.com/](https://web.archive.org/web/20221030110754/https://developer.twitter.com/en)\n    [https://github.com/Nickwasused/twitter-data-export-to-blocklist](https://web.archive.org/web/20240519173959/https://github.com/Nickwasused/twitter-data-export-to-blocklist)\n    [https://www.python.org/](https://web.archive.org/web/20240519112608/https://www.python.org/)\n    [https://pastebin.com](https://web.archive.org/web/20240519105333/https://pastebin.com/)\n    [https://twitter-blocklist-auth.glitch.me/](https://web.archive.org/web/20240308204003/https://twitter-blocklist-auth.glitch.me/)",
  "title": "Block all Twitter advertising accounts from your timeline.",
  "updatedAt": "2022-03-15T00:00:00.000Z"
}