Comments (11)
The project is discontinued? @jagrosh
from jlyrics.
A-Z Lyrics at some point enabled some measures to prevent scraping. You can test this for yourself by visiting the site, doing a search, and noting the token in the URL. Removing this token and visiting the same page will always return an empty search result.
If you want to seek out a fix for A-Z Lyrics, then be my guest. There may be a way to get a temporary token, since the site doesn't require login.
from jlyrics.
As for the other tests, there isn't enough information to determine why they are failing. Something I plan to change in this project is adding new methods on the client that throw relevant exceptions instead of just returning null
.
from jlyrics.
@jagrosh I knew that, unfortunately the token automatically generates itself after a certain amount of time, would you be able to fix this issue or does it take you so much time?
from jlyrics.
It's something I can look into but I don't have a solid timetable for when I'll be able to get to it.
from jlyrics.
I appreciate your help.
from jlyrics.
I don't know how to compile this, so I can't test this out, but I think I know what A-Z Lyrics is doing. When queried without the token, the response includes a hidden input field named x. The query needs to be resubmitted with this field x.
So the idea is something like this:
The configuration file would need a line something like this to select the value attribute.
tokenselect = "input[name=x][value]"
And the lyricsclient would have something like this?
/* get token selector from configuration file */
String tokenSelector = config.getString("lyrics." + source + ".search.tokenselect");
/* if token selector matches the query result, then extract the token value, and retry the request */
Element token = doc.selectFirst(tokenSelector);
if (token != null) {
String tokenvalue = token.attr("value");
connection = Jsoup.connect(searchUrl + "&x=" + tokenValue).userAgent(userAgent).timeout(timeout);
doc=connection.get();
}
I can think of all sorts of reasons why this isn't going to work, but I hope it helps simplify things a little when you have time to look into this.
from jlyrics.
@cantelope I will test for you
from jlyrics.
@cantelope it cannot be work
from jlyrics.
#12 I tested myself this PR, A-Z Lyrics work correctly, soon I check if genius work too.
from jlyrics.
@jagrosh Can you please check this? None of the lyrics provider seems to work. Not even currently playing songs.
from jlyrics.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jlyrics.