|
1 |
| -<h1>Tweeds - Twitter Scraping Tool</h1> |
2 |
| -<p align="center"><img src="https://media.tenor.com/Xrt-ty39PfEAAAAC/elon-musk-smoke.gif"/></p> |
| 1 | +# Tweeds - Twitter Scraping Tool |
3 | 2 |
|
4 |
| -Scrape tweets from any Twitter user profile. Twitter API alternative to scrape Twitter hashtags, threads, images, videos, statistics, |
5 |
| -and Twitter history. Export data in JSON and CSV format. This project enables you to extract large amounts of data from Twitter. |
6 |
| -It lets you do much more than the Twitter API, because it doesn't have rate limits and you don't even need to have a **Twitter account, a registered app, |
| 3 | +<p align="center"> |
| 4 | +<img src="https://media.tenor.com/Xrt-ty39PfEAAAAC/elon-musk-smoke.gif"/> |
| 5 | +</p> |
| 6 | + |
| 7 | +Scrape tweets from any Twitter user profile. Twitter API alternative to scrape Twitter hashtags, threads, images, videos, statistics, |
| 8 | +and Twitter history. Export data in JSON and CSV format. This project enables you to extract large amounts of data from Twitter. |
| 9 | +It lets you do much more than the Twitter API, because it doesn't have rate limits and you don't even need to have a **Twitter account, a registered app, |
7 | 10 | or Twitter API key.**
|
8 | 11 |
|
9 | 12 | ### Do not forget to star this project.🌟 😍
|
10 | 13 |
|
11 | 14 | ## 💡 Features
|
12 |
| -- No API Key required |
| 15 | + |
| 16 | +- No API Key required |
13 | 17 | - No Limit
|
14 | 18 | - No Authentication required
|
15 | 19 | - Get tweets from specific user
|
16 | 20 | - JSON and CSV export for further Data Analysis
|
17 | 21 | - And the best part it is OpenSource 😉
|
18 | 22 |
|
19 | 23 | ## ✔️ Requirements
|
| 24 | + |
20 | 25 | - Python >= 3.9
|
21 | 26 |
|
22 |
| -## ⚙ Installation |
| 27 | +## ⚙ Installation |
| 28 | + |
23 | 29 | ```bash
|
24 | 30 | pip install tweeds
|
25 | 31 | ```
|
26 | 32 |
|
27 | 33 | ## 💃 Usage
|
28 |
| - |
29 | 34 |
|
30 |
| -## 📙 Example |
31 |
| -Getting tweets from a specific user |
32 |
| -```Bash |
33 |
| -tweeds -u TheNameisYash --json yashtweets.json |
34 |
| -``` |
35 |
| -Getting tweets from a search term or #hastag |
36 | 35 | ```Bash
|
37 |
| -tweeds -s "#Messi" --json messigoat.json --minLikes 10000 --limit 100 |
38 |
| -``` |
39 |
| -Getting tweets from a specific region (.ie Paris) |
40 |
| -```Bash |
41 |
| -tweeds -s "coffee sucks" --near Paris --limit 100 |
| 36 | +achyuthjoism-MBP ~ %tweeds |
| 37 | + |
| 38 | + ████████╗░██╗░░░░░░░██╗███████╗███████╗██████╗░░██████╗ |
| 39 | + ╚══██╔══╝░██║░░██╗░░██║██╔════╝██╔════╝██╔══██╗██╔════╝ |
| 40 | + ░░░██║░░░░╚██╗████╗██╔╝█████╗░░█████╗░░██║░░██║╚█████╗░ |
| 41 | + ░░░██║░░░░░████╔═████║░██╔══╝░░██╔══╝░░██║░░██║░╚═══██╗ |
| 42 | + ░░░██║░░░░░╚██╔╝░╚██╔╝░███████╗███████╗██████╔╝██████╔╝ |
| 43 | + ░░░╚═╝░░░░░░╚═╝░░░╚═╝░░╚══════╝╚══════╝╚═════╝░╚═════╝░ |
| 44 | + |
| 45 | + by Achyuth Jois M |
| 46 | + |
| 47 | +usage: tweeds [-h] [-u U] [-s S] [--since SINCE] [--until UNTIL] [--limit LIMIT] [--near NEAR] [--geocode GEOCODE] |
| 48 | + [--year YEAR] [--today] [--verified] [--link LINK] [--videos] [--images] [--media] [--minLikes MINLIKES] |
| 49 | + [--minRetweets MINRETWEETS] [--minReplies MINREPLIES] [--json JSON] [--csv CSV] [--silent] |
| 50 | + |
| 51 | +Scrape twitter user tweets |
| 52 | + |
| 53 | +options: |
| 54 | + -h, --help show this help message and exit |
| 55 | + -u U Users Tweets you want to scrape. |
| 56 | + -s S Search for Tweets containing this word or phrase. |
| 57 | + --since SINCE Filter Tweets sent since date (Example: "2017-12-27 20:30:15" or 2017-12-27). |
| 58 | + --until UNTIL Filter Tweets sent until date (Example: "2017-12-27 20:30:15" or 2017-12-27). |
| 59 | + --limit LIMIT Number of Tweets to pull |
| 60 | + --near NEAR Find tweets near a particular location |
| 61 | + --geocode GEOCODE Search for geocoded Tweets. |
| 62 | + --year YEAR Filter Tweets before specified year. |
| 63 | + --today Filter Tweets from today |
| 64 | + --verified Display Tweets only from verified users (Use with -s). |
| 65 | + --links LINK Exclude tweets containing one or more links. |
| 66 | + --videos Display only Tweets with videos. |
| 67 | + --images Display only Tweets with images. |
| 68 | + --media Display Tweets with only images or videos. |
| 69 | + --minLikes MINLIKES Minimun likes for the tweet |
| 70 | + --minRetweets MINRETWEETS |
| 71 | + Minimun retweets for the tweet |
| 72 | + --minReplies MINREPLIES |
| 73 | + Minimun replies for the tweet |
| 74 | + --json JSON File to write the JSON output to. |
| 75 | + --csv CSV To store the output in CSV |
| 76 | + --silent Dont print the tweets(Only works while taking an output!)[Type anything] |
| 77 | + |
| 78 | +achyuthjoism-MBP ~ % |
| 79 | + |
42 | 80 | ```
|
43 |
| -A some more simple examples to help you understand the basics: |
44 | 81 |
|
45 |
| -- `tweeds -u username` - Scrape all the Tweets of a *user* (doesn't include **retweets** but includes **replies**). |
46 |
| -- `tweeds -u username -s pineapple` - Scrape all Tweets from the *user*'s timeline containing _pineapple_. |
47 |
| -- `tweeds -s pineapple` - Collect every Tweet containing *pineapple* from everyone's Tweets. |
| 82 | +## 📙 Example |
| 83 | +
|
| 84 | +### CLI Example |
| 85 | +
|
| 86 | +Some simple examples to help you understand the basics: |
| 87 | +
|
| 88 | +- `tweeds -u username` - Scrape all the Tweets of a _user_ (doesn't include **retweets** but includes **replies**). |
| 89 | +- `tweeds -u username -s pineapple` - Scrape all Tweets from the _user_'s timeline containing _pineapple_. |
| 90 | +- `tweeds -s pineapple` - Collect every Tweet containing _pineapple_ from everyone's Tweets. |
48 | 91 | - `tweeds -u username --since "2015-12-20 20:30:15"` - Collect Tweets that were tweeted since 2015-12-20 20:30:15.
|
49 | 92 | - `tweeds -u username --since 2015-12-20` - Collect Tweets that were tweeted since 2015-12-20 00:00:00.
|
50 |
| -- `tweeds -u username --csv file.csv` - Scrape Tweets and save as a csv file. |
| 93 | +- `tweeds -s "Rocking Star Yash" --verified` - Display Tweets by verified users that Tweeted about Rocking Star Yash. |
| 94 | +- `tweeds -geocode "48.880048,2.385939,1km" --csv paris.csv --limit 10` - Scrape Tweets from a radius of 1km around a place in Paris and export them to a csv file. |
| 95 | +- `tweeds -u username --images` - Scrape Tweets from a user containing only images. |
| 96 | +- `tweeds -u username --videos` - Scrape Tweets from a user containing only videos. |
| 97 | +- `tweeds -u username --media` - Scarape Tweets from a user containing both images and videos. |
| 98 | +- `tweeds -u username --links` - Scrape Tweets from a user which excludes links. |
51 | 99 | - `tweeds -u username --json file.json` - Scrape Tweets and save as a json file.
|
| 100 | +- `tweeds -u username --csv file.csv` - Scrape Tweets and save as a csv file. |
| 101 | +
|
| 102 | +### Module Example |
| 103 | +
|
| 104 | +Now Tweed can be used as a module and allows custom formatting. |
| 105 | +Example: |
| 106 | +
|
| 107 | +```python |
| 108 | +import tweeds |
| 109 | +
|
| 110 | +query = tweeds.Query() |
| 111 | +
|
| 112 | +query.search = "Yash Boss" |
| 113 | +query.limit = 10 |
| 114 | +query.verified = True |
| 115 | +
|
| 116 | +tweeds.search(query) |
| 117 | +``` |
52 | 118 |
|
53 | 119 | **Have fun 🥰💞**
|
54 | 120 |
|
|
0 commit comments