robertou2 commited on
Commit
e9ba58b
·
1 Parent(s): 54e1678

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -71,17 +71,18 @@ def run():
71
  if ( termino == False and usuario == False):
72
  st.text('Error no se ha seleccionado ningun check')
73
  error=True
74
- elif (termino):
75
- new_search = search_words + " -filter:retweets"
76
- tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",since=date_since).items(number_of_tweets)
77
- elif (usuario):
78
- tweets = api.user_timeline(screen_name = search_words,count=number_of_tweets)
79
  elif ( termino == True and usuario == True):
80
  st.text('Error se han seleccionado los dos check')
81
  error=True
82
 
83
 
84
  if (error == False):
 
 
 
 
 
 
85
  tweet_list = [i.text for i in tweets]
86
  #tweet_list = [strip_undesired_chars(i.text) for i in tweets]
87
  text= pd.DataFrame(tweet_list)
 
71
  if ( termino == False and usuario == False):
72
  st.text('Error no se ha seleccionado ningun check')
73
  error=True
 
 
 
 
 
74
  elif ( termino == True and usuario == True):
75
  st.text('Error se han seleccionado los dos check')
76
  error=True
77
 
78
 
79
  if (error == False):
80
+ if (termino):
81
+ new_search = search_words + " -filter:retweets"
82
+ tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",since=date_since).items(number_of_tweets)
83
+ elif (usuario):
84
+ tweets = api.user_timeline(screen_name = search_words,count=number_of_tweets)
85
+
86
  tweet_list = [i.text for i in tweets]
87
  #tweet_list = [strip_undesired_chars(i.text) for i in tweets]
88
  text= pd.DataFrame(tweet_list)