Spaces:
Runtime error
Runtime error
wira.indra
commited on
Commit
•
74046b8
1
Parent(s):
d453dbe
add twitter feature
Browse files- twitter_scraper.py +1 -1
twitter_scraper.py
CHANGED
@@ -6,7 +6,7 @@ import re
|
|
6 |
def scrape_tweets(query, max_tweets=10):
|
7 |
tweets_list = []
|
8 |
for i,tweet in enumerate(sntwitter.TwitterSearchScraper(query).get_items()):
|
9 |
-
if max_tweets != -1 and i >= int(
|
10 |
break
|
11 |
tweets_list.append([tweet.date, tweet.id, tweet.content, tweet.user.username, tweet.likeCount, tweet.retweetCount, tweet.replyCount, tweet.quoteCount, tweet.url, tweet.lang])
|
12 |
|
|
|
6 |
def scrape_tweets(query, max_tweets=10):
|
7 |
tweets_list = []
|
8 |
for i,tweet in enumerate(sntwitter.TwitterSearchScraper(query).get_items()):
|
9 |
+
if max_tweets != -1 and i >= int(max_tweets):
|
10 |
break
|
11 |
tweets_list.append([tweet.date, tweet.id, tweet.content, tweet.user.username, tweet.likeCount, tweet.retweetCount, tweet.replyCount, tweet.quoteCount, tweet.url, tweet.lang])
|
12 |
|