Search This Blog

Tuesday, March 25, 2025

DELETE YOUR TWEETS AND LIKES WITH PYTHON


If you want to delete all your tweets and likes with one shot, you can use this python script.

you need to find (or create) you api keys and secrets from https://developer.x.com/en/portal/dashboard page.



import json

import time

import tweepy

import os

from datetime import datetime


def load_tweet_ids_from_archive(file_path):

    """Load tweet IDs from Twitter archive files (tweets.js or like.js)"""

    tweet_ids = []

    

    try:

        with open(file_path, 'r', encoding='utf-8') as f:

            # Twitter archive files have some JavaScript at the start

            content = f.read().replace('window.YTD.tweets.part0 = ', '')

            data = json.loads(content)

            

            for tweet in data:

                tweet_id = tweet['tweet']['id_str']

                tweet_ids.append(tweet_id)

                

    except Exception as e:

        print(f"Error loading {file_path}: {str(e)}")

    

    return tweet_ids


def delete_tweets(api, tweet_ids, batch_size=100, delay_seconds=2):

    """Delete tweets in batches with delay to avoid rate limits"""

    deleted_count = 0

    failed_count = 0

    

    for i in range(0, len(tweet_ids), batch_size):

        batch = tweet_ids[i:i + batch_size]

        

        for tweet_id in batch:

            try:

                api.destroy_status(tweet_id)

                print(f"Deleted tweet {tweet_id}")

                deleted_count += 1

                time.sleep(delay_seconds)

            except tweepy.errors.TweepyException as e:

                if 'No status found with that ID' in str(e):

                    print(f"Tweet {tweet_id} already deleted or not found")

                else:

                    print(f"Failed to delete tweet {tweet_id}: {str(e)}")

                    failed_count += 1

                    

        print(f"Progress: {deleted_count} deleted, {failed_count} failed")

        

    return deleted_count, failed_count


def main():

    # Load Twitter API credentials from environment variables

    consumer_key = os.getenv('TWITTER_API_KEY')

    consumer_secret = os.getenv('TWITTER_API_SECRET')

    access_token = os.getenv('TWITTER_ACCESS_TOKEN')

    access_token_secret = os.getenv('TWITTER_ACCESS_TOKEN_SECRET')

    

    if not all([consumer_key, consumer_secret, access_token, access_token_secret]):

        print("Please set all required Twitter API environment variables:")

        print("TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_TOKEN, TWITTER_ACCESS_TOKEN_SECRET")

        return

    

    # Authenticate with Twitter API

    auth = tweepy.OAuthHandler(consumer_key, consumer_secret)

    auth.set_access_token(access_token, access_token_secret)

    api = tweepy.API(auth, wait_on_rate_limit=True)

    

    # Verify credentials

    try:

        user = api.verify_credentials()

        print(f"Authenticated as @{user.screen_name}")

    except tweepy.errors.TweepyException as e:

        print("Authentication failed:", str(e))

        return

    

    # Load tweet IDs from archive files

    tweets_file = 'tweets.js'  # Path to your tweets.js file

    likes_file = 'like.js'     # Path to your like.js file

    

    if not os.path.exists(tweets_file):

        print(f"Error: {tweets_file} not found in current directory")

        return

    

    print("Loading tweet IDs from archive files...")

    tweet_ids = load_tweet_ids_from_archive(tweets_file)

    

    # Optional: Also delete liked tweets (uncomment if desired)

    # like_ids = load_tweet_ids_from_archive(likes_file)

    # tweet_ids.extend(like_ids)

    

    if not tweet_ids:

        print("No tweet IDs found in archive files")

        return

    

    print(f"Found {len(tweet_ids)} tweets to delete")

    

    # Confirm before deletion

    confirm = input(f"Do you want to delete {len(tweet_ids)} tweets? (yes/no): ").strip().lower()

    if confirm != 'yes':

        print("Deletion cancelled")

        return

    

    # Delete tweets

    print("Starting deletion process...")

    deleted, failed = delete_tweets(api, tweet_ids)

    

    print("\nDeletion complete!")

    print(f"Successfully deleted: {deleted}")

    print(f"Failed to delete: {failed}")


if __name__ == '__main__':

    main()

Sunday, February 2, 2025

Earn Crypto With Prepaid Credit Card

 



**Earn Crypto Rewards with Plutus.it’s Prepaid Debit Card – Start Today!**


Are you looking for a way to earn cryptocurrency while spending on everyday purchases? Look no further than **Plutus.it**! With their innovative **prepaid debit card**, you can earn crypto rewards effortlessly. Whether you're shopping online, paying bills, or grabbing a coffee, Plutus.it turns your spending into earning opportunities.


### Why Choose Plutus.it?

- **Earn Crypto Rewards**: Get up to **3% cashback in crypto** on every purchase.

- **No Fees**: Enjoy a fee-free experience with no hidden charges.

- **Easy to Use**: Simply top up your card and start spending to earn rewards.

- **Secure & Reliable**: Plutus.it ensures your transactions are safe and secure.


### How to Get Started

1. **Sign Up**: Use my referral link to join Plutus.it and unlock exclusive benefits and get yor 10€

https://dex.plutus.it/auth/referee/signup?refId=2BqiEb

2. **Order Your Card**: Get your prepaid debit card delivered to your doorstep.

3. **Start Earning**: Use your card for everyday purchases and watch your crypto rewards grow.


### Bonus for New Users

By signing up through my referral link, you’ll get a **welcome bonus 10€** to kickstart your crypto earnings. Don’t miss this opportunity to turn your spending into a rewarding experience!


👉 **Join Now**:

https://dex.plutus.it/auth/referee/signup?refId=2BqiEb



Start earning crypto today with Plutus.it’s prepaid debit card. It’s time to make your money work for you!


---


**#CryptoRewards #PlutusIt #PrepaidCard #EarnCrypto #Cryptocurrency #Cashback #CryptoCard**

Thursday, January 30, 2025

Very nice game for shooting the balls !!!




 app-ads.txt

google.com, pub-4477547239336054, DIRECT, f08c47fec0942fa0