Closed fatiharaci closed 7 years ago
after using better sorting algorithm this time reduced to 14 seconds:
sorted_tweets = sorted(parsed_tweets2, key=lambda x: parsed_tweets2[x]['count'], reverse=True)
for i in range(0, tnum):
if (top_songs_count > len(top_songs_array)):
top_song = parsed_tweets2[sorted_tweets[i]]['text']
if top_song not in top_songs_array:
top_songs_array.append(parsed_tweets2[sorted_tweets[i]]['text'])
index_array.append(sorted_tweets[i])
This problem is solved by adding waiting button to the design
This is due to limit of 100 tweets per request of twitter API. It is not much but it could be enhanced due to user satisfaction.