twitter_api
Python code to extract tweets using X's API and Tweepy
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.0%) to scientific vocabulary
Repository
Python code to extract tweets using X's API and Tweepy
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
About
Uses X's v2 API, Tweepy, Pandas, and Regex to extract tweets based on a user provided query. Data is written to an excel file as tweets are pulled.
The main python file uses the v2 Recent Search endpoint (https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-recent) to collect tweet text, post date, author information, mentions, and more.
Prerequisites
Create a X Developer account: https://developer.twitter.com/en/products/twitter-api and create a v2 app. Generate appropriate tokens. This code uses App Only authentication: https://developer.twitter.com/en/docs/authentication/oauth-2-0/application-only
Install Tweepy in your python environment: https://docs.tweepy.org/en/stable/index.html
Notes
The getusersfollowers and getusersfollowing functions were degraded by X in June 2023: https://developer.twitter.com/en/updates/changelog. They are still included in the code with hopes the functionality will one day return!
Owner
- Name: Laboni Bayen
- Login: labonibayen
- Kind: user
- Repositories: 1
- Profile: https://github.com/labonibayen
Citation (citation.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Bayen" given-names: "Laboni" title: "Twitter_API" version: 1.0.0 date-released: 2023-05-10 url: "https://github.com/labonibayen/Twitter_API"