Inspiration

Most of us are looking for what songs to play next or what artists and playlists are trending Similarly, budding artists are always always on the look for how their songs and albums are going. Twitter is one of the biggest platforms where people share their thoughts and analysing the music links shared we could find what music people listen to

What it does

It analyses 1000 tweets with spotify or soundcloud links in it and displays top 6 links that were tweeted there are 6 categories

  • Recent Soundcloud songs
  • Popular Soundcloud songs
  • Recent Spotify artists
  • Popular Spotify artists
  • Recent Spotify playlists
  • Popular Spotify playlists

Oh and there are 4 easter eggs for you to find!

How I built it

Using Tweepy and Flask on python twitter api is accessed and 1000 tweets with keywords are fetched Links are found from meta data and tallied up 6 links with maximum count are made into JSON

{"link":occurrence}

This is sent to the react based frontend server which displays them to user as cards

Challenges I ran into

API calls to twitter takes too long (approx 30 seconds) for 1000 tweets thus making the website look slow. Implementing dark mode took more time than anticipated Credits on GCP got over. So had to shift backend to heroku and frontend to github pages All 4 easter eggs took time to implement

Accomplishments that I'm proud of

Containerized both the servers The results from fetching the tweets actually looks promising

What I learned

  • Twitter API
  • Flask
  • Heroku
  • Importance of commiting from time to time

What's next for TweetSongs

  • By using Spotify's and Soundcloud's APIs we could fetch the details on page rather than providing normal links to external websites
  • Adding search feature for artists so they could see how popular their songs, albums or profiles are on Twitter.
  • More insights could be provided from the data fetched.
  • Reduce the fetch time by multithreading and/or by using enterprise version of Twitter APIs.
Share this project:

Updates