Code Monkey home page Code Monkey logo

songscrapper's Introduction

SongScrapper

A WebScrapper but with your favorite band songs

What is it?

  • My first published project :')
  • A Code that collect the lyrics from a website and writes in a .xlsx file the word and the number of times it shows;
  • It also uses Tree Trie Data Structure, so you can use it into another project in case you need this kind of Data Structure.

Here's what I was able to do with the Data and the help of Tableau for visualiation purposes.

Have a look in this Word Cloud image made with the words that we retrieve from the album The Dark Side of The Moon by Pink Floyd darkside of the moon

And here is another Word Cloud image from the words gathered from the album Amnesiac by Radiohead amnesiac

Work to do

  • Get Lyrics in AZLycrics.com
  • Construct a Tree Trie
  • Make the Data ready for use (.csv)
  • Create things with the Data
  • Make the code more customable and easier for use
  • Make it automatic (maybe?)
  • Make a better console output (?)
  • Conquer the World
  • Create a good Readme for this project

How does it work?

The 3 Scripts that I used will gather the Data, deal with the Data and write the Data.

  • WebScrapper.py module gets the data;
  • TrieOOP.py is the Data Structure, it will save the data has a Tree and make it ready and easy to use for what you need;
  • dataWriter.py will get the Data from TrieOOP and write it in a .xlsx file with two rows (Word and Value).

You can find more information in the documentation of the Code.

Examples

import WebScrapper as WS
import TrieOOP
import dataWriter as DW

WS.mainStarter('radiohead', *getAlbumSongs('radiohead', 'amnesiac'))
data1 = WS.tree.getData(WS.tree)
data2 = WS.tree.getAll(data1)
DW.xlsxWriter(data1, data2, "amnesiac")
  • It will print the following feedback:
Scraping packt like sardines in a crushed tin box --- Song 1 of 10
Scraping pyramid song --- Song 2 of 10
Scraping pull / pulk revolving doors --- Song 3 of 10
Scraping you and whose army? --- Song 4 of 10
Scraping i might be wrong --- Song 5 of 10
Scraping knives out --- Song 6 of 10
Scraping amnesiac / morning bell --- Song 7 of 10
Scraping dollars and cents --- Song 8 of 10
Scraping like spinning plates --- Song 9 of 10
Scraping life in a glass house --- Song 10 of 10
  • This is the example.py script, it will create a .xlsx file with the information gathered of the album Amnesiac.

What we've learned

  • How to gather information directly from a WebSite (Web Scrap);

  • How to use Tableau to create a image with the Data;

  • And in The Dark Side of The Moon the word 'love' appear only once ,but 'mad' appears 6 times.


Contribuitors

avatar arthur avatar lucas
Arthur Tavares Lucas Menezes

songscrapper's People

Contributors

arthurharrison avatar lucas-menezes avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.