https://github.com/dapivei/tweetple
A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.
https://github.com/dapivei/tweetple
academic twitter
Last synced: 6 months ago
JSON representation
A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.
- Host: GitHub
- URL: https://github.com/dapivei/tweetple
- Owner: dapivei
- License: mit
- Created: 2021-11-18T07:54:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-05T02:18:25.000Z (almost 3 years ago)
- Last Synced: 2024-11-06T14:46:06.516Z (6 months ago)
- Topics: academic, twitter
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# TWEETPLE
[](https://developer.twitter.com/en/docs/twitter-api/early-access)
## Installation
The easiest way to install the latest version from PyPI is by using pip:
```python
pip install tweetple
```## Usage
+ Users, Followers, Liking Users and Retweeted By Lookup
```python
import tweetplefrom 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()
```+ Retrieve Tweets
One can provide as input a **list** of:
1. Tweets' ids
2. Tweeples' handles
3. Links
```python
import tweetplefrom 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()```