{"id":18909997,"url":"https://github.com/jonasbn/somafm-currently-playing","last_synced_at":"2026-03-07T12:30:19.664Z","repository":{"id":41142062,"uuid":"508402358","full_name":"jonasbn/somafm-currently-playing","owner":"jonasbn","description":"A basic webscraper to fetch currently playing track from a given station","archived":false,"fork":false,"pushed_at":"2025-01-07T18:32:18.000Z","size":31,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T05:27:21.513Z","etag":null,"topics":["hacktoberfest","perl","scraper","somafm"],"latest_commit_sha":null,"homepage":"","language":"Perl","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/jonasbn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-28T17:54:30.000Z","updated_at":"2025-01-07T18:32:22.000Z","dependencies_parsed_at":"2024-07-14T09:50:50.990Z","dependency_job_id":"5a403649-4e6d-4c81-a5be-62d3dfdad7fb","html_url":"https://github.com/jonasbn/somafm-currently-playing","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fsomafm-currently-playing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fsomafm-currently-playing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fsomafm-currently-playing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fsomafm-currently-playing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/somafm-currently-playing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239898462,"owners_count":19715212,"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":["hacktoberfest","perl","scraper","somafm"],"created_at":"2024-11-08T09:38:55.547Z","updated_at":"2026-03-07T12:30:19.603Z","avatar_url":"https://github.com/jonasbn.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# somafm-currently-playing\n\nA basic webscraper to fetch the currently playing track from a specified [SomaFM] station\n\n## Usage\n\nFetch the currently playing track from the specified [SomaFM] station.\n\n```bash\ncarton exec ./somafm-currently-playing.pl dronezone\n\"Innesti + Jacob Newman\" playing \"Windslept\" from album: \"Spoke of Several\"\n```\n\nSaving the currently playing track to a file.\n\n```bash\ncarton exec -- ./somafm-currently-playing.pl dronezone \u003e\u003e check_out_later.txt\n```\n\nBoth getting the currently playing track and saving it to a file\n\n```bash\ncarton exec -- ./somafm-currently-playing.pl dronezone | tee -a check_out_later.txt\n\"Innesti + Jacob Newman\" playing \"Windslept\" from album: \"Spoke of Several\"\n```\n\n## Installation\n\nThere is not proper installation at this time. The application is a single script, which can be executed using [carton](https://metacpan.org/pod/Carton).\n\n```bash\ncarton exec -- ./somafm-currently-playing.pl \u003cstation\u003e\n```\n\n## Description\n\nTODO\n\n## Diagnostics\n\nTODO\n\n## Exit Status\n\n- `0` success, provided argument has resolved and the currently playing track has been located and emitted\n\n- `1` no station short name argument is provided\n\n- `2` the provided station shortname does not match any known stations\n\n## Dependencies\n\n- Mojolicious\n- Perl 5.16.0 or higher\n- OpenSSL\n\nPlease see `cpanfile` for a complete list of dependencies.\n\n## Bugs and Limitations\n\nThe application is basically a webscraper, so it will break of the HTML for the SomaFM website changes radically and the expected structure is no longer in place.\n\n## Author\n\n- jonasbn\n\n## Motivation\n\nI have been consuming [SomaFM] marvelous streaming for ages. Some times tracks I listen too stand out and I want to save them for later. I used to do this using  **AppleScript** to fetch the information from iTunes, however the source code was lost at some point.\n\nSince I wanted to pick up the practice again, I decided to scrape the information from [SomaFM].\n\nPerl has pretty strong scraping capabilities and especially when using Mojolicious, so I decided to use those tools for this task.\n\n## Resources and References\n\n- [SomaFM]\n- [SomaFM playlists](https://somafm.com/playlist/)\n- [Playlist for Space Station Soma](https://somafm.com/spacestation/songhistory.html)\n- [Mojolicious](https://mojolicious.org/)\n- [Mojolicious Cookbook: \"Web-scraping\"](https://docs.mojolicious.org/Mojolicious/Guides/Cookbook#Web-scraping)\n- [Mojolicious: Mojo::DOM::CSS](https://docs.mojolicious.org/Mojo/DOM/CSS)\n- [dev.to: \"Scraping Google Scholar with Perl and Mojo\"](https://dev.to/raigaurav/scrapping-google-scholar-with-perl-and-mojo-4neg) by Gaurav Rai, served as good example\n\nIf you want to dig more into the topic of Mojolicious client, I can point to the following book:\n\n- [Mojolicious Web Clients](https://leanpub.com/mojo_web_clients) by brian D Foy\n\n## License and Copyright\n\nCopyright Jonas Brømsø (jonasbn) 2022-2024\n\nMIT License, see separate `LICENSE` file\n\n[SomaFM]: https://somafm.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fsomafm-currently-playing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fsomafm-currently-playing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fsomafm-currently-playing/lists"}