{"id":24456121,"url":"https://github.com/arthurdjn/scrape-lyricwiki","last_synced_at":"2025-04-13T02:29:33.646Z","repository":{"id":62577213,"uuid":"265894209","full_name":"arthurdjn/scrape-lyricwiki","owner":"arthurdjn","description":"Scrape music data from LyricsWiki (https://lyrics.fandom.com). Artists, Albums, Songs can be extracted.","archived":false,"fork":false,"pushed_at":"2023-10-26T21:35:12.000Z","size":596,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T23:36:56.248Z","etag":null,"topics":["beautifulsoup","lyrics","lyrics-api","lyrics-scraping","lyricsfandom","lyricwiki","music","scraper"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthurdjn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-21T16:11:23.000Z","updated_at":"2023-10-26T21:35:16.000Z","dependencies_parsed_at":"2022-11-03T19:08:51.230Z","dependency_job_id":null,"html_url":"https://github.com/arthurdjn/scrape-lyricwiki","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fscrape-lyricwiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fscrape-lyricwiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fscrape-lyricwiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fscrape-lyricwiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurdjn","download_url":"https://codeload.github.com/arthurdjn/scrape-lyricwiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657749,"owners_count":21140839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beautifulsoup","lyrics","lyrics-api","lyrics-scraping","lyricsfandom","lyricwiki","music","scraper"],"created_at":"2025-01-21T02:15:26.242Z","updated_at":"2025-04-13T02:29:33.614Z","avatar_url":"https://github.com/arthurdjn.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/readthedocs/lyricsfandom)](https://lyricsfandom.readthedocs.io/en/latest/index.html)\n[![](https://img.shields.io/pypi/v/lyricsfandom)](https://pypi.org/project/lyricsfandom/)\n![](https://img.shields.io/pypi/status/lyricsfandom)\n\n\u003e **Note**  \n\u003e The LyricWiki website is closed (see [issue #1](https://github.com/arthurdjn/scrape-lyricwiki/issues/1) and [wiki notice](https://en.wikipedia.org/wiki/LyricWiki)). The package is no longer working as of 2023.\n\n# lyricsfandom\nScrape music data from LyricsWiki (https://lyrics.fandom.com). Artists, Albums, Songs can be extracted.\n\n*Project made during a Deep Learning project for music generation using GPT2 model.*\n\n\n# Installation\n\nInstall *lyricsfandom* package from *PyPi*:\n\n```\npip install lyricsfandom\n```\n\nOr from *GitHub*:\n\n```\ngit clone https://github.com/arthurdjn/scrape-lyricwiki\ncd scrape-lyricwiki\npip install .\n```\n\n# Getting Started\n\n## LyricsFandom API\n\nYou can search for ``Artist``, ``Album`` or ``Song`` from the API:\n\n```python\nfrom lyricsfandom import LyricWiki\n\n# Connect to the API\nwiki = LyricWiki()\n\n# Search for an artist. `LyricsFandom` is not case sensitive.\nartist = wiki.search_artist('london grammar')\n# Search for an album\nalbum = wiki.search_album('london grammar', 'if you wait')\n# ...Or a song\nsong = wiki.search_song('london grammar', 'wicked game')\n# And retrieve its lyrics\nlyrics = song.get_lyrics()\nprint(lyrics)\n```\n\n```\nThe world was on fire and no-one can save me but you\nStrange what desire can make foolish people do\nI'd never dreamed that I'd meet somebody like you\nI'd never dreamed that I'd lose somebody like you\n\nNo, I don't wanna fall in love\nNo, I don't wanna fall in love\nWith you\n\nWhat a wicked thing to do\nTo make me dream of you\nWhat a wicked thing to say\nTo make me feel this way\n[...]\n```\n\n\n## Structure\n\nThe package is divided as follows:\n\n* ArtistMeta\n* AlbumMeta, inherits from ArtistMeta\n* SongMeta, inherits from AlbumMeta\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/lyricsfandom.png\" height=\"600\"/\u003e\n\u003c/p\u003e\n\n## Retrieve data\n\n\nOnce you have one of these objects, you can also access data directly through their methods:\n\n```python\nartist = wiki.search_artist('london grammar')\nalbums = artist.get_albums()\nsongs = artist.get_songs()\n\n# Idem from an album\nalbum = wiki.search_album('london grammar', 'if you wait')\nsongs = album.get_songs()\n```\n\nIn addition, you can retrieve parent objects from children:\n\n```python\nartist = wiki.search_artist('london grammar')\nsong = artist.search_song('strong')\n\n# Access to parent classes\nalbum = song.get_album()\nartist = song.get_artist()\n```\n\nYou can scrape for description, links and other details information:\n\n```python\nartist = wiki.search_artist('london grammar')\ninfo = artist.get_info()  # description of the artist (band members, genres, labels etc.)\nlinks = artist.get_links()  # links where to buy the artist's music.\n```\n\n## Save and export\n\nYou can save data in a JSON format (and encode it to ASCII if you want).\n\n```python\nartist = wiki.search_artist('london grammar')\nartist_data = artist.to_json(encode='ascii')\n# Idem for Album and Song\n```\n\n# Efficiency\n\nThis package can make a lot of connections while scraping data.\nHere is a small comparison of different packages, made on scraping 10 songs from an album.\n*pylyrics3* is the fastest to retrieve data, but it only return lyrics on a JSON format (and not OOP).\n*lyricsfandom* have similar results, but *lyricsmaster* is 10 times slower.\n\n![img](img/comparison.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurdjn%2Fscrape-lyricwiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurdjn%2Fscrape-lyricwiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurdjn%2Fscrape-lyricwiki/lists"}