lyrics fetcher: add support for tekstowo.pl

This commit is contained in:
Andrzej Rybczak
2016-11-16 07:18:34 +01:00
parent 308c2be2f6
commit b833818023
3 changed files with 10 additions and 0 deletions

1
NEWS
View File

@@ -5,6 +5,7 @@ ncmpcpp-0.8 (????-??-??)
* Require C++14 compatible compiler during compilation.
* Lyrics from files containing DOS line endings now load properly on Linux.
* Added support for fetching lyrics from genius.com.
* Added support for fetching lyrics from tekstowo.pl.
ncmpcpp-0.7.7 (2016-10-31)
* Fixed compilation on 32bit platforms.

View File

@@ -45,6 +45,7 @@ LyricsFetcher *lyricsPlugins[] =
new LyricsmaniaFetcher(),
new MetrolyricsFetcher(),
new JustSomeLyricsFetcher(),
new TekstowoLyricsFetcher(),
new InternetLyricsFetcher(),
0
};

View File

@@ -124,6 +124,14 @@ protected:
virtual const char *regex() const override { return "<lyrics.*?>(.*?)</lyrics>"; }
};
struct TekstowoLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() const override { return "tekstowo.pl"; }
protected:
virtual const char *regex() const override { return "<div class=\"song-text\">.*?</h2>(.*?)<a"; }
};
struct InternetLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() const override { return "the Internet"; }