lyrics fetcher: update lyricsmania fetcher
This commit is contained in:
@@ -247,16 +247,6 @@ bool MetrolyricsFetcher::isURLOk(const std::string &url)
|
|||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
void LyricsmaniaFetcher::postProcess(std::string &data)
|
|
||||||
{
|
|
||||||
// lyricsmania.com uses iso-8859-1 as the encoding
|
|
||||||
// so we need to convert obtained lyrics to utf-8
|
|
||||||
data = Charset::toUtf8From(data, "iso-8859-1");
|
|
||||||
LyricsFetcher::postProcess(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**********************************************************************/
|
|
||||||
|
|
||||||
LyricsFetcher::Result InternetLyricsFetcher::fetch(const std::string &artist, const std::string &title)
|
LyricsFetcher::Result InternetLyricsFetcher::fetch(const std::string &artist, const std::string &title)
|
||||||
{
|
{
|
||||||
GoogleLyricsFetcher::fetch(artist, title);
|
GoogleLyricsFetcher::fetch(artist, title);
|
||||||
|
|||||||
@@ -90,9 +90,7 @@ struct LyricsmaniaFetcher : public GoogleLyricsFetcher
|
|||||||
virtual const char *name() { return "lyricsmania.com"; }
|
virtual const char *name() { return "lyricsmania.com"; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const char *regex() { return "<div id='songlyrics_h' class='dn'>(.*?)</div>"; }
|
virtual const char *regex() { return "<div class=\"lyrics-body\".*?</strong>(.*?)</div>"; }
|
||||||
|
|
||||||
virtual void postProcess(std::string &data);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Sing365Fetcher : public GoogleLyricsFetcher
|
struct Sing365Fetcher : public GoogleLyricsFetcher
|
||||||
|
|||||||
Reference in New Issue
Block a user