Home

Awesome

TWEETPLE

Twitter API v2 badge

Installation

The easiest way to install the latest version from PyPI is by using pip:

pip install tweetple

Usage

import tweetple

from tweetple import TweetPle

# Bearer token accesible via Twitter Developer Academic Research Track
bearer_token='AAAAAAAA'

# List of handle ids
ids = ['308131814']

# Retrieve users' information
TweetPle.TweepleStreamer(ids, bearer_token).user_lookup()

# Retrieve followers' information
TweetPle.TweepleStreamer(ids, bearer_token).followers_lookup()

# List of tweet ids

ids = ['308131814']

# Retrieve liking users
TweetPle.TweepleStreamer(ids, bearer_token).likes_lookup()

# Retrieve retweeting users

TweetPle.TweepleStreamer(ids, bearer_token).retweet_lookup()

One can provide as input a list of:

  1. Tweets' ids

  2. Tweeples' handles

  3. Links

import tweetple

from tweetple import TweetPle

# bearer token accesible via Twitter Developer Academic Research Track
bearer_token='AAAAAAAA'

# list of tweets' ids
tweetl = ['1461090445702881281']
TweetPle.TweetStreamer(tweetl, bearer_token).main()

# list of tweeplers' handles
tweeplel = ['zorroyanez']
TweetPle.TweetStreamer(tweeplel, bearer_token).main()

# list of links potentially shared via twitter
linkl = ['https://lula.com.br/22-vitorias-judiciais-de-lula-inquerito-contra-filhos-e-encerrado-por-falta-de-provas/']
TweetPle.TweetStreamer(linkl, bearer_token).main()