https://github.com/zenklinov/tweepy
This Python script demonstrates how to scrape recent tweets from Twitter using the Tweepy library. The script searches for tweets containing the hashtag #pepguardiola, retrieves additional tweet metadata such as context annotations and creation time, and saves the results into an Excel file.
https://github.com/zenklinov/tweepy
get-data scraping twitter
Last synced: about 1 year ago
JSON representation
This Python script demonstrates how to scrape recent tweets from Twitter using the Tweepy library. The script searches for tweets containing the hashtag #pepguardiola, retrieves additional tweet metadata such as context annotations and creation time, and saves the results into an Excel file.
- Host: GitHub
- URL: https://github.com/zenklinov/tweepy
- Owner: zenklinov
- License: apache-2.0
- Created: 2024-11-29T03:05:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T10:54:41.000Z (over 1 year ago)
- Last Synced: 2025-02-24T11:42:09.825Z (over 1 year ago)
- Topics: get-data, scraping, twitter
- Language: Jupyter Notebook
- Homepage:
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Data Scraper using Tweepy
This Python script demonstrates how to scrape recent tweets from Twitter using the Tweepy library. The script searches for tweets containing the hashtag `#pepguardiola`, retrieves additional tweet metadata such as context annotations and creation time, and saves the results into an Excel file.
---
## Features
- **Twitter API Integration**: Fetch recent tweets with a specific query using Tweepy.
- **Tweet Metadata**: Retrieve fields such as `context_annotations` and `created_at`.
- **Data Export**: Save the scraped data into an Excel file for further analysis.
---
## Prerequisites
1. **Twitter Developer Account**:
- Obtain a **Bearer Token** from the [Twitter Developer Portal](https://developer.twitter.com/).
2. **Python Libraries**:
- `tweepy`: For accessing the Twitter API.
- `pandas`: For data manipulation and exporting to Excel.
- Install dependencies using:
```bash
pip install tweepy pandas
```
---