Skip to content
Snippets Groups Projects
Commit b29b9fff authored by Corentin Lasne's avatar Corentin Lasne
Browse files

modif du corps du code

parent a640491a
No related branches found
No related tags found
1 merge request!5modif du corps du code
import snscrape.modules.twitter as sntwitter import snscrape.modules.twitter as sntwitter
import pandas as pd import pandas as pd
from src.functions import construct_query, convert_date_str, calc_frequency from src.functions import construct_query, convert_date_str, calc_frequency, supress_n
table = pd.DataFrame(columns=['date', 'tweet']) table = pd.DataFrame(columns=['date', 'tweet'])
...@@ -20,7 +20,7 @@ for i, tweet in enumerate(sntwitter.TwitterSearchScraper(query=construct_query(t ...@@ -20,7 +20,7 @@ for i, tweet in enumerate(sntwitter.TwitterSearchScraper(query=construct_query(t
break break
if (tweet.lang in languages): if (tweet.lang in languages):
dict = {'date': convert_date_str( dict = {'date': convert_date_str(
tweet.date), 'tweet': tweet.rawContent} tweet.date), 'tweet': supress_n(tweet.rawContent)}
if ("metaverse" in tweet.rawContent.lower()): if ("metaverse" in tweet.rawContent.lower()):
table = pd.concat([table, pd.DataFrame.from_records([dict])]) table = pd.concat([table, pd.DataFrame.from_records([dict])])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment