Skip to main content

Get tweets replies from a user account

Project description

Getting Started

Install

pip install twiplies

How to use

from twiplies.core import Twiplies
import os
from dotenv import load_dotenv

load_dotenv()

robot = Twiplies(
    username="joaopcnogueira",
    consumer_key=os.getenv("CONSUMER_KEY"),
    consumer_secret=os.getenv("CONSUMER_SECRET"),
    access_token=os.getenv("ACCESS_TOKEN"),
    access_token_secret=os.getenv("ACCESS_TOKEN_SECRET")
)
robot
Twiplies(username='joaopcnogueira')

Get tweet’s replies from a specific tweet_id:

robot.get_replies_from_tweet(tweet_id='1552109783393751042', n_tweets=100)
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
tweet_original tweet_replies tweet_user tweet_location
0 1552109783393751042 @joaopcnogueira Sim! O carregador não posso ma... annppn Rio de Janeiro, Brazil

Get tweet’s replies from all twitters from an user:

robot.get_all_replies(n_tweets=1000)
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
tweet_original tweet_replies tweet_user tweet_location
0 1553619245552091136 @jeremyphoward Did I forgot to mention all of ... joaopcnogueira
1 1553412331845160962 @joaopcnogueira @arnaldog12_ Olha só, não esta... apachaves France
2 1552333709717786625 @joaopcnogueira 🥲 mribeirodantas Natal, Brazil🇧🇷
3 1552112385065877504 @joaopcnogueira não 😣 annppn Rio de Janeiro, Brazil
4 1552109783393751042 @joaopcnogueira Sim! O carregador não posso ma... annppn Rio de Janeiro, Brazil
5 1550922456625463296 @joaopcnogueira Salam, here is your unroll: ht... UnrollHelper

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twiplies-0.0.4.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

twiplies-0.0.4-py3-none-any.whl (9.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page