-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.IndexOutOfBoundsException for 27 pages - tested 862_674 pages. #768
Comments
No problem, I didnt forget this. In fact, I am moving Lagarto to a separate, individual project, as it deserves special attention - it is one of the two most used libraries of Jodd. Thank you for helping with this:) Stay tuned, the plan is to migrate this week |
Here's a simple reproducer for the first page: <html>
<body>
<!--->
-->
</body>
</html> Please note the comment block is not closed in |
These comments are going to kill me :))))) |
I believe this one is fixed in last PR, but not released yet. |
Are snapshots published on Sonatype or should I build locally? |
Locally, sorry. |
Will give it a try tomorrow then :) |
Note: that's the same |
Yap, just tested here, the above HTML snippet works on master |
So hopefully you're fine now 🤞 |
Haha, this was close :))) |
I want to upload all html pages that I used in the test. Unfortunately, it looks like Github has limit of 5GB per repository - I have 13GB. I will upload it to S3, but I need to return from travel - around 1 week. I downloaded all the html and in http-client set by default UTF-8 encoding. In the specification I saw that finding a proper encoding is tricky. Can you recommend some library to do it? |
Hey @marekhudyma awesome! You can use https://wetransfer.com as well. Yeah, the encoding is tricky, but isn't it set by the response? Are you using Jodd http library? One idea is to download everything with same encoding and then resolve encoding from e.g. meta tags, and then reload string. Just na idea, thinking out loud here. |
I found this definition of encodings and it is not trivial: I use Async Http Client, but I am still evaluating which async http client gives biggest configuration (for example stop downloading if file is bigger than x bytes). I wrote some performance test that compare Jsoup, Jericho, HtmlCleaner, Lagarto with default configuration and Lagarto with tuned configuration. It looks Lagarto is the fastest ;-)
But my Intellij cannot resolve method "$". Is documentation not updated or I do something wrong? |
I had to remove |
btw regarding speed ... its Lagarto < LagartoDOM < Jerry |
Try also just |
Here, new repo created: https://github.com/oblac/jodd-lagarto, migration is in progress :) |
@marekhudyma see oblac/jodd-lagarto#3 I am thinking of way how to add a bunch of files for the tests. I guess I can put them in the Docker image so not to increase the repo size? |
Thanks for this hint. The LagartoDOM is so badly documented, I am not sure how to use it.
|
I know @marekhudyma. I will put my efforts now in Lagarto. Even a separate web site :) |
As I promised, To make it work, you need to download 13 GB of downloaded pages. It is around 1 million (862_542) pages. Go to folder IN and execute aws S3 bucket synchronization:
Then run: JoddLagartoCorrectnessTest |
I got a problem to commit all files to GitHub, but maybe commiting 10 of them would be an option to have automated test. All of them you can run from time to time.. |
(I think there was a limit of 5GB for whole repository.. ) |
Just download the files :) I believe Docker image with all the files will make sense... |
@marekhudyma what are your memory settings for the test? I have an issue with |
Soon... www.joddlagarto.com :) |
@slandelle @marekhudyma @moh-sushi Here is the snapshot that is a beta: https://oss.sonatype.org/content/repositories/snapshots/org/jodd/jodd-lagarto/
I made some minor API improvements, that is basically it. The website is ready: www.joddlagarto.com :) I will now remove Lagarto from here and do the big test, that is all whats left. please, if you have some time, you can try this snapshot before its released :) |
Would be great if Wondering about the perf impact of passing a Consumer<Supplier> though. |
Ah true. Regarding performance, I was thinking in skipping the construction of debug strings... but I will do that better now. |
Yeah, I got carried away :) |
@igr Nice website it comming. |
Awesome @marekhudyma - you dont have to do anything, you already did enough :) I am handling this locally, Docker images are also out of option, so it's going to be all locally. Just please use the latest version, that is all that I ask :) |
@igr I run test aginst all these pages and there were no exceptions. I run the newest snapshot version
Congratulations, you've fixed issue ;-) |
Why not lagarto.jodd.org? Also, why Godaddy? 😲 ;) |
Good question, @neroux... to be honest, I was looking for the quickest way to make documentation, and it seems that GitBook works so far. The new doc is totally separated, has a separate repository etc. - hence the new URL I believe I can use a subdomain on jodd.org, but the Lagarto pages would look different from the rest of the existing website. Would that make sense?
10+ years ago it seemed like a good idea;))) |
Please, no worries. I was just curious. Either approach will work just fine. Using hostnames of
I know, I also was with that company once until their CEO went on hunting safaris for elephants and leopards. |
Damn, didn't know that. Do you have an alternative @neroux to recommend? I am bit tired of their non-working website anyway |
Been using https://www.gandi.net for ages. |
Recently I have been using mostly www.porkbun.com for gTLD domains. |
I will migrate from Godday on the next payment cycle, too much for me atm... @neroux makes sense, https://lagarto.jodd.org it is. I will try to add Reader as an input, and then I will release lagarto to 6. For now, I will update this repo and current docs. |
Current behavior
I got java.lang.IndexOutOfBoundsException while parsing 27 pages!
I use:
Exception that I have:
Expected behavior
No exception.
Steps to Reproduce the Problem
My code:
Pages that I parsed:
How I found it ?
I found my old zip file with 1 million downloaded pages (ok, is it 862_674) and I parsed it.
I will try to push it to my github.. the zip file is 13GB big, it should be possible (?)
I will let you know later. But you have all failing pages, so you can start fixing it.
The text was updated successfully, but these errors were encountered: