Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khaouitiabdelhakim/ailyrics-js
ai-lyrics is a JavaScript library that allows you to easily fetch song lyrics from various sources on the web. It utilizes Puppeteer, a headless browser automation tool, to scrape lyrics from search results and provides methods to retrieve lyrics by song title or by both song title and artist.
https://github.com/khaouitiabdelhakim/ailyrics-js
javascript library lyrics lyrics-fetcher lyrics-finder lyrics-generator lyrics-plugin lyrics-scraping lyrics-search npm songs
Last synced: 12 days ago
JSON representation
ai-lyrics is a JavaScript library that allows you to easily fetch song lyrics from various sources on the web. It utilizes Puppeteer, a headless browser automation tool, to scrape lyrics from search results and provides methods to retrieve lyrics by song title or by both song title and artist.
- Host: GitHub
- URL: https://github.com/khaouitiabdelhakim/ailyrics-js
- Owner: khaouitiabdelhakim
- Created: 2024-02-16T13:59:16.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-17T13:58:52.000Z (3 months ago)
- Last Synced: 2024-10-10T12:45:10.841Z (29 days ago)
- Topics: javascript, library, lyrics, lyrics-fetcher, lyrics-finder, lyrics-generator, lyrics-plugin, lyrics-scraping, lyrics-search, npm, songs
- Language: JavaScript
- Homepage: https://khaouitiapps.web.app/
- Size: 746 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# AI-Lyrics
![alt text](https://github.com/khaouitiabdelhakim/AILyrics-JS/blob/main/LyricsAI.png)```
If you find this repository useful or it has helped you,
please don't forget to leave a ⭐️, or even follow my GitHub account.
Your support motivates me to continue providing helpful resources.
Thank you for your appreciation! 🌟🚀💖😊👍If you'd like to support further, consider buying me a coffee:
```
[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee--yellow.svg?style=for-the-badge&logo=buy-me-a-coffee)](https://www.buymeacoffee.com/kh.abdelhakim)## Description
`ai-lyrics` is a JavaScript library that allows you to easily fetch song lyrics from various sources on the web. It utilizes Puppeteer, a headless browser automation tool, to scrape lyrics from search results and provides methods to retrieve lyrics by song title or by both song title and artist.
## Installation
You can install `ai-lyrics` via npm:
```bash
npm install ai-lyrics
```## Usage
```javascript
const LyricsAI = require('ai-lyrics');(async function() {
try {
const songTitle = "Lily";
const artist = "Alan Wlaker";
//find with Title and Artist
const lyricsByTitleAndArtist = await LyricsAI.findLyricsBySongTitleAndArtist(songTitle, artist);//find with just Title
const lyricsByTitle = await LyricsAI.findLyricsBySongTitle(songTitle);
console.log(`Find with Title and Artist ${lyricsByTitleAndArtist}`, `Find with Title ${lyricsByTitle}`);
} catch (error) {
console.error("Error:", error);
}
})();
```Running this example will log the lyrics of the song "Lily" by Alan Walker.
```
Lily was a little girl
Afraid of the big, wide world
She grew up within her castle walls
Now and then, she tried to run
...
Just let me in, ooh
```## Notes
- Make sure you have Node.js installed on your system.
- Please be aware of web scraping regulations and respect the terms of service of the websites from which you are scraping lyrics.## Author
This library is authored by KHAOUITI ABDELHAKIM.
For more information, visit the [GitHub repository](https://github.com/khaouitiabdelhakim/AILyrics-JS).
## Contribution
```
Fork this repository if you wish to make changes or contribute improvements.
```## License
```
Copyright 2024 KHAOUITI ABDELHAKIMLicensed under the MIT License
You may obtain a copy of the License athttp://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software
distributed under the MIT License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the MIT License.
```