Fix lyrics fetchers

This commit is contained in:
Andrzej Rybczak
2020-01-12 06:43:52 +01:00
parent 31ee76e8ee
commit d86c965143
2 changed files with 4 additions and 4 deletions

View File

@@ -240,7 +240,7 @@ LyricsFetcher::Result GoogleLyricsFetcher::fetch(const std::string &artist,
return result;
}
auto urls = getContent("<A HREF=\"(.*?)\">here</A>", data);
auto urls = getContent("<A HREF=\"http://www.google.com/url\\?q=(.*?)\">here</A>", data);
if (urls.empty() || !isURLOk(urls[0]))
{

View File

@@ -103,10 +103,10 @@ protected:
struct Sing365Fetcher : public GoogleLyricsFetcher
{
virtual const char *name() const override { return "sing365.com"; }
virtual const char *name() const override { return "lyrics007.com"; }
protected:
virtual const char *regex() const override { return "<div class=\"content\">.*?</script></div>(.*?)<script>"; }
virtual const char *regex() const override { return "<div class=\"lyrics\">(.*?)</div>"; }
};
struct JustSomeLyricsFetcher : public GoogleLyricsFetcher
@@ -162,7 +162,7 @@ struct ZeneszovegFetcher : public GoogleLyricsFetcher
virtual const char *name() const override { return "zeneszoveg.hu"; }
protected:
virtual const char *regex() const override { return "<div class=\"lyrics-plain-text\">(.*?)</div>"; }
virtual const char *regex() const override { return "<div class=\"lyrics-plain-text.*?\">(.*?)</div>"; }
};
struct InternetLyricsFetcher : public GoogleLyricsFetcher